Questions tagged [json]
The json tag has no summary.
99 questions
1
vote
1
answer
96
views
Reading JSON from Arduino via Serial Missing Parts of Message
I have a project (Digital Dashboard for a Motorhome) in Pi that reads JSON data from an Arduino board and sends it via Serial.
The Pi gets the JSON data, makes some adjustments and then sends it to an ...
0
votes
1
answer
115
views
Accessing invalid key in ArduinoJson causes ESP32 to reboot [closed]
I am running a project where I have multiple ESP32s communicate over WebSockets and I am using the Arduino IDE 2.3.4 for it. The communication primarily uses JSON and sends it as strings. To work with ...
0
votes
1
answer
196
views
deserializeJson() failed: NoMemory when sending Serial json using ArduinoJson
Hey all I have a sketch that takes up 99% of my storage space since I am using a Arduino Nano.
Although everything in my code fits as-is, there seems to be an issue with me sending a json string over ...
1
vote
2
answers
567
views
Need help with parsing NWS JSON weather alerts causing reset on ESP8266
I'm trying to parse the JSON string from the National Weather Service Alerts and am encountering a problem where the code can't parse the value and the device auto-resets. I've used this code before ...
1
vote
1
answer
862
views
How to add one JsonDocument to another in ArduinoJson
I'm utilizing this json library: https://arduinojson.org/
I am attempting to write a function that creates a response object, and wraps an already built json document:
void sendResponse(
...
1
vote
0
answers
67
views
esp8266 r1 mini stops serial print during execution
The setup includes an WEMOS/ESP8266 R1 mini compatible board, a DHT11, a photo resistor and a magnetic reed.
The libs used are:
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include &...
-1
votes
1
answer
771
views
Best way to get JSON from struct vector class
I have a vector which consist of a struct, see below:
struct FileInformation
{
String name;
size_t filesize;
};
std::vector<FileInformation> FileInformations;
How do I get JSON ...
0
votes
2
answers
989
views
ArduinoJSON :: How to determine Array's size in a DOC conatinaing not only Arrays
Parameter file containing MQTT topics as shown below, is read into StaticJsonDocument<1250> DOC variable.
Size of some groups may differ between MCU's, for example sub_topics_win may contain ...
0
votes
1
answer
401
views
Determining ArduinoJSON document size based on file size
I'm trying to effectively allocate a doc's size, based on the size of the file saved in flash of ESP8266. Is there a way?
For example: file.size() X 1.5
-1
votes
1
answer
1k
views
Use of ESPAsyncWebServer.h with ArduinoJson version 6 for Master-Client transactions
I want to communicate two (2) ESP32's via Json commands using ESPAsyncWeb.h. The master should have specific operations to execute and respond to the client, and the client should be able to send ...
1
vote
1
answer
1k
views
How to convert serialized JSON string back to JSON object?
How to convert JSON String for example
{"f0":100,"f1":100,"f2":100}
It is what I get from my esp01 side from I2C communication
Now I want it to get it back to my Arduino ...
2
votes
2
answers
312
views
ArduinoJson library parsing error
I am trying to retrieve JSON mqtt message I received in ESP32.
void mqttMsgCallback(char* topic, byte* payload, unsigned int length) {
payload[length] = '\0';
String _message = String((char*)...
1
vote
1
answer
838
views
Custom library for Arduino to encode and decode JSON Web Tokens
So I have been recently been trying to create a library for Arduino to encode and decode JSON Web tokens(JWT) using HMAC-SHA256.
For those unfamiliar, JWT has 3 parts - The header, body and signature....
1
vote
1
answer
628
views
How to properly handle the Arduino String
I've read that the Arduino String is bad as it causes memory fragmentation, so I try to avoid them mostly. But I still have some occurences where I'm not quite sure if they are ok after all.
The first ...
3
votes
1
answer
7k
views
Getting all data of my JSON object from Serial.read() at once
I'm new to Arduino and I'm building a project that fetches data from a website (using ESP8266) and then transfers them to my Arduino UNO via serial port.
Data coming from ESP8266 every 20s - [{"x&...
1
vote
0
answers
75
views
Changing the order of GUI-elements inside Arduino ESP-Dash-library
I'm trying to add a new item "index" to GUI-elements that are created by using ArduinoJSON and the Vue.js-framework inside the ESP-Dash-library.
The library creates GUI-elements like buttons,...
1
vote
0
answers
109
views
JSON Parser fails because number of bytes is being sent
Sorry I am new with this.
I am trying to read a JSON response from my website using an ESP8266, but it keeps failing. I am using the following code:
WiFiClientSecure httpsClient; //Declare object ...
3
votes
2
answers
288
views
Understanding ArduinoJson capacity calculation assistant
I am trying to figure out how ArduinoJson capacity can be calculated, therefore I came by the Assistant web application developed by the developer of the library https://arduinojson.org/v6/assistant/
...
2
votes
1
answer
188
views
RFID reading function returning null
I have a function that reads an RFID card and returns the RFID string. The function reads the string well but I am using the ArduinoJson library to generate JSON.
This is the function that I am using ...
2
votes
0
answers
3k
views
Reading JSON from Arduino over serial in python and writing to a JSON file on computer
I'm fairly new to Arduino so I used a sample code before integrating this into my main code. I'm printing my value in a JSON format over serial. My Arduino outputs this and the python receives this ...
1
vote
1
answer
401
views
cant read json data esp 32 “parseObject() failed”
hello I am just trying to make Youtube Subscribe Counter with led matrix 32*8 and esp 32 and I had this problem when I trying to get
subscribers to count
so what is the problem and how I can fix it? `...
0
votes
1
answer
3k
views
Reading a json file from SPIFFS and displaying the info it contains on an embedded web page
I am working on a smart IR receiver that reads an IR signal, decodes it and saves that decoded info in a json file stored on the NodeMCU's SPIFFS. This info is then displayed on the embedded web ...
1
vote
1
answer
533
views
How send method POST with JSON? Arduino UNO R3 + SIM900
Why is the server side of php not loading any data from arduino? What did I do wrong?
String reading="{\"latitude\": 12.983027, \"longitude\": 80.2594}";
mySerial.println("AT+HTTPINIT");
...
2
votes
1
answer
273
views
How to get full response json SIM900 + Arduino?
void toSerial(int delay_ms)
{
delay(delay_ms);
while(mySerial.available())
{
Serial.write(mySerial.read());
}
}
Serial.begin(9600);
mySerial.begin(9600);
mySerial....
1
vote
2
answers
669
views
WiFi.begin doesn't work with ArduinoJson's const char* output
I'm using ArduinoJson to parse a file full of JSON strings that contain the SSID and password for the registered networks. I have a little web interface that runs in soft AP mode so you can scan for ...