Code: Select all
Structure json_
test1.b
test2.b
EndStructure
Define json.json_
json\test1 = #True
json\test2 = #False
js = CreateJSON(#PB_Any)
InsertJSONStructure(JSONValue(js), @json, json_)
Debug ComposeJSON(js, #PB_JSON_PrettyPrint)
but it is{
"test1": true,
"test2": false
}
My two questions:{
"test2": 0,
"test1": 1
}
Why is bool interpreted wrong? In Json 0 and 1 are numbers and not booleans.
Why is the output not in the order of how it was declared the structure?