Questions tagged [json]
The json tag has no summary.
99 questions
3
votes
1
answer
4k
views
ArduinoJSON v6 - Passing buffer as function parameter
I'm new to ArduinoJSON - so perhaps it is a newbie's question.... but I wish to pass a StaticJsonDocument into a function as a parameter ( later on it should be implemented in a library ).
exmaple ...
3
votes
1
answer
1k
views
how to transfer json to string?
I am getting a json object from aws iot MQTT. Assuming that json from aws is {status:opened}.
Here is my code.
#include <ArduinoJson.h>
void messageHandler(char *topic, byte *payload, unsigned ...
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&...
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/
...
3
votes
2
answers
672
views
Serial data affected by interrupt
In my recent project, I have done everything means capture serial data and split it out in proper form.
Until now everything is fine. But when I add another portion of code which contains Interrupt. ...
2
votes
2
answers
11k
views
NodeMCU (Arduino IDE) 'DynamicJsonBuffer' was not declared in this scope
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <ArduinoJson.h>
#include <ESP8266HTTPClient.h>
#define USE_SERIAL Serial
...
2
votes
1
answer
266
views
ArduinoJson- unexplained '.size()' behaviour
I'm using an ESP8266, ArduinoJson v6.21.5. PlatformIO, and Vscode.
The config file is saved and read correctly to the ESP8266's flash:
{
"gen_pubTopic": [
"DvirHome/Messages&...
2
votes
1
answer
4k
views
How to post JSON data from Arduino?
I want to post data that I'm getting from the sensor every 5 seconds to my application in JSON format. Initially, I'm getting data as int and converting into String.
For example:
if data=15, it is ...
2
votes
2
answers
315
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*)...
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....
2
votes
1
answer
237
views
ESP32 webserver with a loaded page fails to update data in elements after sending an Json file, the Json data is printed instead of the loaded page
I have a ESP32 with a web server. In the page where I show the sensor readings and the state of the system, right now the readings are showing themselves well. The problem comes when I want to show ...
2
votes
0
answers
201
views
Using HTTPClient with ESP not working
I have a program running on an esp8266 that attempts to fetch json data from an HTTPS endpoint that is hosted on aws amplify (data comes from a next.js app).
I can retrieve the data correctly when I ...
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 ...
2
votes
0
answers
926
views
ArduinoJSON v6 - return a StaticJsonDocument from a function [duplicate]
I'm reading a stored JSON file from an ESP8266. I wish to return it as a StaticJsonDocument for further use.
return it at the end of function was done OK, but I need to assign it for document.
#...