I'm trying to parse the JSON response form google. This is what I currently have:
Dim x As New System.Web.Script.Serialization.JavaScriptSerializer
Dim gJson As String = ""
Dim wClient As New WebClient
wClient.Proxy = System.Net.HttpWebRequest.DefaultWebProxy
gJson = wClient.DownloadString("https://www.googleapis.com/...alt=json")
Dim results As gResponseClass = x.Deserialize(Of gResponseClass)(gJson)
gResponseClass
as follows here: PasteBin
I keep getting the following exception thrown:
Invalid object passed in, member name expected. (6678): .... *the json response here* ...
Is there any blatant problems or solutions I could implement?
EDIT :
The JSON response from google: JSON Response
EDIT
Just for continuation purposes: the erros is cased indeed by the "":
inside the pagemap
node on facebook pages. I have resorted to calling a cleanup function as follows:
json = json.Replace(""""":", """page_id"":")
Return json
If anyone has a better way, please let me know!
Thanks again.