InsertJsonList change structure order... NO Bug
Posted: Mon May 19, 2025 3:45 pm
Hello,
This code give strange result :
I want this result :
Is this possible ? A bug ? Missing something ?
Any help appreciated...
This code give strange result :
Code: Select all
Structure mystruct
tz.s
pz.s
uz.s
EndStructure
NewList mylist.mystruct()
*e.mystruct
*e=AddElement(mylist())
*e\tz="aaa"
*e\pz="bbb"
*e\uz="ccc"
;
*e=AddElement(mylist())
*e\tz="ddd"
*e\pz="eee"
*e\uz="fff"
If CreateJSON(0); , #PB_JSON_NoCase)
InsertJSONList(JSONValue(0),mylist())
Debug ComposeJSON(0,#PB_JSON_PrettyPrint)
EndIf
Code: Select all
[
{
"tz": "aaa",
"pz": "bbb",
"uz": "ccc"
},
{
"tz": "ddd",
"pz": "eee",
"uz": "fff"
}
]
Is this possible ? A bug ? Missing something ?
Any help appreciated...