Code: Select all
Structure test
a.s
b.s
c.s
d.s
EndStructure
form.test
form\a = "Hello"
form\c = "World"
If CreateJSON(0)
InsertJSONStructure(JSONValue(0), @form, test)
Debug ComposeJSON(0, #PB_JSON_PrettyPrint)
EndIf
Code: Select all
{
"a": "Hello",
"b": "",
"c": "World",
"d": ""
}
For an output like so:
Code: Select all
{
"a": "Hello",
"c": "World"
}
For example:
Code: Select all
Structure info
a.i
b.i
c.i
EndStructure
Structure ad
Array a.info(0)
EndStructure
Structure test
a.s
b.s
c.s
Array d.ad(0)
EndStructure
form.test
form\a = "Hello"
form\c = "World"
form\d(0)\a(0)\a = 137
If CreateJSON(0)
InsertJSONStructure(JSONValue(0), @form, test)
Debug ComposeJSON(0, #PB_JSON_PrettyPrint)
EndIf
It would be nice for:
Code: Select all
Structure info
a.i
b.i
c.i
EndStructure
Structure ad
Array a.info(0)
EndStructure
Structure test
a.s
b.s
c.s
Array d.ad(0)
EndStructure
form.test
form\d(0)\a(0)\a = 137
If CreateJSON(0)
InsertJSONStructure(JSONValue(0), @form, test)
Debug ComposeJSON(0, #PB_JSON_PrettyPrint)
EndIf
Code: Select all
{
"d": [
{
"a": [
{
"a": 137
}
]
}
]
}
Is there a way around this functionality that is simple and clean?