Quantcast
Channel: Chilkat Forum - latest questions
Viewing all articles
Browse latest Browse all 1061

Problem creating complex JSON document

$
0
0

I am trying to create a JSON string from a database using the Chilkat JSON object. I started with the example here: Create more Complex JSON Document. The JSON that I am trying create is a dictionary of arrays. If I modify the example code by removing the top 3 strings I get an object error. I am not sure the cause but I think it is something internal.

set json = Server.CreateObject("Chilkat_9_5_0.JsonObject")
Response.Write json.Version   <-- 9.5.0.56

' success = json.AddStringAt(-1,"Title","The Cuckoo's Calling")
' success = json.AddStringAt(-1,"Author","Robert Galbraith")
' success = json.AddStringAt(-1,"Genre","classic crime novel")   <-- allow any of these line and there is no error

success = json.AddObjectAt(-1,"Detail")
Set detail = json.ObjectAt(json.Size - 1)
success = detail.AddStringAt(-1,"Publisher","Little Brown")   <-- runtime error '800a01a8' Object required

Viewing all articles
Browse latest Browse all 1061

Trending Articles