Okay, version 2 will have a 'Handler' (Mr. Json),
Which depending on the structure of the JSON, will raise a code, for example:
-
1000 = it's a Null JSON
-
1001 = it's not a JSON
-
1002 = it’s a JSON json Dictionary
-
1003 = it's a JsonArray,
-
1004 = It's a Nested Json Array
-
1005 = Even Mr. Json knows what is this
-
This way, can handle different logic depending on the structure.
Could leverage the structure recognition provided by 'Mr. Json' to convert one structure into another.
Dictionary as Object: { "key1": "value1", "key2": "value2" }
Array: [ "value1", "value2", "value3" ]
Nested Arrays: [ [ "value1", "value2" ], [ "value3", "value4" ] ]
Yes, but this approach has his considerations, like:
-
Correct Structure: Ensure that the converted text remains valid JSON. This approach may not be suitable for complex or deeply nested JSON structures.
-
Validation: Need additional validation to ensure the JSON format is correct after transformation.
This method of text manipulation is useful for simple transformations but might not handle complex JSON structures properly.
Other: is org.json
library that's MIT Appinventor use, is well-suited for many common JSON processing tasks and small to medium-sized JSON files/Datasets.
Better choice be Gson
library implementation, that can handle large datasets and structures more efficiently (performance & flexibility).
- But i don´t know how manipulate libraries en Niotron IDE
But nothing is it's impossible!
it's all about learn, knowledge, combining technique, ingenuity, knowledge, and read all error Logs
Imagine:
- For a use case; an Arduino/ESP32 sending data every minute to a cloud service (Table, Document, Collection, etc), containing information such as humidity, temperature, wind, pressure, rain, and solar radiation. a (6*1440) Json dataset.
Some phones will blow up! performing that task