Page 1 of 1

convert structured list() to json string

Posted: Wed Sep 23, 2020 9:52 am
by menschmarkus
Hi,

converting a JSON string to a structure is easy. You just need to use ExtractJSON....
But how is about converting a structured list() into a JSON String? I did not find a similar command like ExtractJSON for converting JSON to structure.
Do I really need to pass throug the complete list and build the JSON String manually?

Re: convert structured list() to json string

Posted: Wed Sep 23, 2020 9:59 am
by Peter
InsertJSONStructure() ;)

Re: convert structured list() to json string

Posted: Wed Sep 23, 2020 10:04 am
by menschmarkus
I am a fool :shock:
reading educates :oops:

Re: convert structured list() to json string

Posted: Wed Sep 23, 2020 2:16 pm
by Kurzer
Menschmarkus,

keep in mind that the order of the structure members can always be random.

From my own experience I can say that the order of structure members in SpiderBasic and Purebasic is not always different, but both development environments produce a different version of a JSON string from the same structure.

I have experienced this in my current project and had to build the string myself (because of cross compatibility).

Markus