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

JSON Serialization

$
0
0
JSON Serialization
West Wind Internet Protocols
JSON Serialization
Feb. 4, 2013
01:22 pm
3PI0SML1CShow this entire thread in new window
Gratar Image based on email address
From:Roger Bradshaw
To:All
When attempting the code below to better understand the JSON serializer, I run into problems. I took the code directly from the West Wind Documentation.

The first error I recieve is the property NUMBER is not found. If I ignore that, the next statement returns the error "cannot find entry point JsonEncodingstring in the DLL.

I believe I have the most current wwipstuff and Newtonsoft.Json DLLs installed.

Code -

DO wwJsonSerializer && Load libs

*** Create a complex object
loCust = CREATEOBJECT("Empty")
ADDPROPERTY(loCust,"Name","Rick")
ADDPROPERTY(loCust,"Entered",DATETIME())

*** Create a nested object
ADDPROPERTY(loCust,"Address", CREATEOBJECT("Empty"))
ADDPROPERTY(loCust.Address,"Street","32 Kaiea Place")
ADDPROPERTY(loCust.Number,32)

loSer = CREATEOBJECT("wwJsonSerializer")

*** Serialize into JSON
lcJson = loSer.Serialize(loCust)

? lcJson


Viewing all articles
Browse latest Browse all 10393

Trending Articles