Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: wwJsonSerializer parse error

$
0
0
Re: wwJsonSerializer parse error
Web Connection
Re: wwJsonSerializer parse error
Jan. 28, 2013
10:06 am
3PB0LO35NShow this entire thread in new window
Gratar Image based on email address
From:Rick Strahl
To:Bob Roenigk

Did you use the DeserializeJson() method which is new and different from Deserialize()?

I know the JSON you have there most likely wouldn't deserialize with the old serializer because it didn't allow for linebreaks in the whitespace.

+++ Rick ---


I am running v5.65 and the actual JSON string within the data file has single quotes.

The total data file is just short of 15k in size. The parse seems to fail immediately on the third line.

{"PRODUCTS": {"node_2": {"region": "North Atlantic","regioncode": "at","outlook": "ABNT20","discussion": "AXNT20","tropical_index_region": "at" },

~bob



If that's the actual JSON string then the value is invalid.

FWIW, if you're running the latest version of Web Connection (5.65) it has DeserializeJson() which uses an external JSON parser that's more reliable than the internal fox based one.

+++ Rick ---



Hi Rick,

I am getting a parse error with wwJsonSerializer. Here is my code with a reference to the json data in question:

lcHTML = oHTTP.HTTPGet("http://tinyurl.com/ap57olf","","","") loSer = CREATEOBJECT("wwJsonSerializer") loUnder = loSer.Deserialize(lcHTML)

The crash occurs in wwjsonSerializer: Line 48: [ADDPROPERTY(loObject,lcProperty, this.Deserialize(lcValue) )]

lcValue contains the following (including the double quotes which appear to be the problem):

""North Atlantic""

jsonlint.com does show the json data is valid.

~bob






Rick Strahl
West Wind Technologies


from Lago de Garda, Italy

Making waves on the Web


Viewing all articles
Browse latest Browse all 10393

Trending Articles