I am trying to create a JSON file using the JSONGenerator.
This is the output I desire:
However, the JSONGenerator requires that you pass it a map, not a list. This means I have to set a key. I tried passing NULL and then an empty string and got the expected results:
So the question is, how do I get the structure:
...without the maps one and only key showing up?
This is the output I desire:
B4X:
{
[
{
"Text": "Item #1"
},
{
"Text": "Item #2"
},
]
}
However, the JSONGenerator requires that you pass it a map, not a list. This means I have to set a key. I tried passing NULL and then an empty string and got the expected results:
B4X:
{
"null": [
{
"Text": "Item #1"
},
{
"Text": "Item #2"
},
]
}
OR
{
"": [
{
"Text": "Item #1"
},
{
"Text": "Item #2"
},
]
}
So the question is, how do I get the structure:
B4X:
{[ ...nifty JSON stuff... ]}
...without the maps one and only key showing up?