Questions tagged [arduinojson]
46 questions
1
vote
0 answers
Can't use ArduinoJSON data in an ArduinnoSTL map
I am trying to decode JSON using ArduinoJSON, the results need to be stored in a map defined by ArduinoSTL
The document is structured like this;
{
"type":"init",
"anchors": [
{
"id", "xyz",
"loc": {
"x": 10,
…

CarbonMan
- 4,350
- 12
- 54
- 75
1
vote
2 answers
Get a github folder it's contents as a json file
if I construct this URL, I can see the contents of the images folder as a json in Firefox.
https://api.github.com/repos/DessoCode/ESP32/contents/Images?ref=main
However, this doesn't seem to be a true json since my parser doesn't parse this. I'm…

Desso
- 21
- 2
1
vote
1 answer
Getting json keys from an array from an object using ArduinoJson
I'm having trouble getting the keys (and values) from "prefs" in the following json.
{
"cmd": "set",
"prefs": [
{
"coins": 4
},
{
"enable": true
}
]
}
Code to process json:
DynamicJsonDocument doc(1024);
…

8BitCoder
- 309
- 1
- 10
1
vote
2 answers
How to load config and save new config LittleFS ESP32?
I'm using a json file in the data folder. I want to use this as a config file and update it with values as needed. I have a simple sketch to store ssid and password. First read it out, then change it, then read it out again via the serial monitor…

Voldum
- 41
- 3
1
vote
1 answer
AndroidJSON parsing nested GET-Response
I'am trying to iterate over a nested JSON-Object which i get as a HTTP-GET Response from my Hue-Bridge. The Response is something like this:
{
"name": "ViKo",
"type": "GroupScene",
"group": "2",
"lights": [
"1",
"2",
…

der-jung
- 13
- 3
1
vote
1 answer
Saving Custum Paramter with WifiManager & Arduinojson 6
I'm trying to save an additional custom parameter to wifimanager which is the mqtt server address but all codes available in the library and all over the internet are for Arduinojson 5, I tried upgrading to Arduinojson 6 to the best of my ability.…

ASH
- 89
- 1
- 11
1
vote
0 answers
Copy a jsonarray to a char* []
I have a struct I want to fill with Data from a JSON File with Arduinojson library. Filling the trackCount is no problem. Filling the tracks[] array is where I stuck.
Struct:
struct AudioObject {
byte trackCount;
const char* tracks[];};
in…

user2110946
- 43
- 3
1
vote
1 answer
ArduinoJson 6.15.2: JsonObject does not name a type
Looking for some advice, I'm trying to work with the ArduinoJson library. The problem is with the code listed below:
#include
const size_t capacity = JSON_ARRAY_SIZE(3) + JSON_OBJECT_SIZE(1) + 3*JSON_OBJECT_SIZE(2) +…

lakshjaisinghani
- 171
- 1
- 12
1
vote
2 answers
AsyncTCP on ESP32 and Odd Heap/Socket Issues w/SOFTAP
I'm struggling with an issue where an ESP32 is running as a AP with AsyncTCP connecting multiple ESP32 clients. The AP receives some JSON data and replies with some JSON data. Without the handleData() function, the code runs 100% fine with no…

YachtLover
- 31
- 4
1
vote
1 answer
How to retrieve multiple NDJSON objects from the same file using ArduinoJson?
I am trying to use ArduinoJson to parse Google's quickdraw dataset, which contains .ndjson files with multiple objects inside. I figured how to retrieve the first of the objects in the file using the following simple code:
DeserializationError…

synchronizer
- 1,955
- 1
- 14
- 37
1
vote
2 answers
ESP32 skips last value in JSON
I'm trying to send a JSON to a ESP32 and set the value to a variable, for the first 3 variables it works fine, but for some reason it skips the last one. Right now it's sent in an array, but when it's not in an array and I make it a JSONObject…

JobKlimop
- 21
- 1
- 7
1
vote
0 answers
Serial communication failed between Arduino Nano and NodeMCU using ArduinoJson
I'm new to embedded systems. I'm trying to send data/values to a NodeMCU and I found I could using the ArduinoJSON lib. I'm trying the same thing that the tutorial gives, but I don't know why it doesn't work for me. Can someone tell me why? And how…

Andrew Sanjaya
- 11
- 1
- 5
1
vote
1 answer
In ArduinoJson how can one check if an error occured when creating a JSON document?
In the ArduinoJson library, it is easy to create JSON entries as shown below.
StaticJsonDocument<512> json_doc;
String some_string = "Hello there!";
json_doc["some_string"] = some_string;
The question is what is the best way to check whether the…

Moritz
- 2,987
- 3
- 21
- 34
0
votes
0 answers
Deserialize Arduino JSON was too slow
I have an array of data from MQTT to Nodemcu. I deserialize that data to turn on/off the led indicator in Blynk. But the process is too slow. How can I make it fast?
void callback(char* topic, byte* payload, unsigned int length) {
…
0
votes
0 answers
Arduino JSON deserialization returns wrong value
In my Arduino project, I have the following function:
void callback(char* topic, unsigned char* payload, unsigned int length) {
payload[length] = '\0';
Serial.print("Received: ");
Serial.println(reinterpret_cast(payload));
…

SagiZiv
- 932
- 1
- 16
- 38