Questions tagged [json]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
61 views

ESP8266 Arduino Json object array deserialisation into struct

I'm trying to de serialize an array of JSON objects into a struct. Following the instructions given by the Arduino JSON assistant, I managed to produce this helper function: void JsonPreprocessor(...
1
vote
0answers
12 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,...
0
votes
1answer
35 views

Remove unwanted characters from char type

I'm working on an ESP8266 module that needs to fetch date data from worldtimeapi, everything works fine but the problem is How do I strip of the time field off the datetime JSON response without loop. ...
0
votes
0answers
39 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 ...
1
vote
0answers
39 views

RFID data to JSON [closed]

I need to build an attendance and automatic door with RFID. I am using Arduino UNO and ESP8266 . I can build the project with writing the authorised cards by hand. But I want to create a server and ...
0
votes
1answer
50 views

How to get a specific value from an unknown number of JSON representations?

I am using ArduinoJson and ESP8266HTTPClient. Say I have a DynamicJsonDocument that has an unknown number of entries with information on different persons: [ { "ID": "12345&...
0
votes
0answers
66 views

Receiving serializejson output string as “{}” in ArduinoJson

I am using the ArduinoJson library version 6.17.12 The output received when I use serializeJson(doc,test_string) is {}. I have read in the documentation that it is due to a memory leak and I would ...
3
votes
2answers
90 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/ ...
0
votes
1answer
70 views

ArduinoJSON define as extern

My sketch contains 2 .h files. one defines on 1st .h file: #define JSON_SIZE_IOT 400 #define JSON_SIZE_SKETCH 300 StaticJsonDocument<JSON_SIZE_IOT> paramJSON; StaticJsonDocument<...
2
votes
1answer
47 views

rfid reading function returning null

I have a function that reads rfid card and return rfid string. Function reads string well but. I am using ArduinoJson libray to generate json . this is the function that i am using to read rfid cards. ...
1
vote
2answers
129 views

Unexplained behavior of char array after using `deserializeJson`

I'm using RF24 library to send messages between 2 MCU's : 1) ESP8266 (no Wifi, same code can be compiled to any Arduino board) 2) pro-Micro. Message is sent in JSON format, while using ArduinoJSON ...
0
votes
0answers
105 views

Get data from website with ESP8266 AT commands

I have a big problem. When I use the following code, at the time of reply (+IPD) I do not receive the full answer along with the text in the file or text in echo (php file) or text in json file. How ...
2
votes
0answers
336 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 ...
0
votes
1answer
76 views

Reading and Writing to a JSON File on the Desktop from Arduino?

I'm fairly new to Arduino. I'm working on a project where I'm making HTTP requests using a python code and this lets me read and write to a JSON file on my desktop. I have an Arduino with sensors that ...
1
vote
1answer
74 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? `...
-1
votes
1answer
36 views

ArduinoJson is not adding string to JsonObject. ArduinoJson broken?

So I've got this code String GetTimeString(){ strftime(dateArray, 100, dateFormat, getTimeInfo()); dateString = String(dateArray); Serial.println(dateString); return ...
0
votes
1answer
371 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 ...
-2
votes
1answer
401 views

What is the maximum size of Static Json Document in Arduino JSON?

I'm trying to do serial communication between Arduino mega and a esp8266, and having issues with determining the size of the JSON document. I have read that the receiver buffer size should be greater ...
1
vote
1answer
198 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"); ...
1
vote
0answers
162 views

Edit JSON File on SD Card

I am currently Working on a project, where I save values in a JSON File on an SD Card. The JSON looks something like this: { "ID1":{[[starttime, endtime], [starttime, endtime], [....
1
vote
1answer
80 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
1answer
82 views

Large number into variable

Probably something easy but I’ve not resolved it. I’m extracting data from a JSON string and all the values are correct accept for two. They are referring to two date time values and are in ...
1
vote
2answers
231 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 ...
1
vote
1answer
383 views

Serialize JSON as response to HTTP request

I'd like my ESP8266 to provide some JSON endpoints. I want to use ArduinoJson for serialisation. While this works in general if I serialize into a String and return this String afterwards, I was ...
1
vote
1answer
239 views

json format in esp32 with arduino json

I am using an ESP32 module for bluetooth connection and scaning wifi network. But I cannot format the json using arduinojson library in the way I want. void scanWifiNetworks() { //creating json ...
1
vote
1answer
2k views

publish json data to mqtt

I am trying to publish JSON data to mqtt with following code snippet #include <Arduino_JSON.h> JSONVar data; data["temperature"] = temperature; data["humidity"] = humidity; data["pressure"] = ...
0
votes
1answer
2k views

Serial communication from Arduino to ESP8266 NodeMCU works, but from NodeMCU to Arduino isn't working

My circuit connection is like: (I am following this tutorial) Code uploaded to Arduino: #include <SoftwareSerial.h> #include <ArduinoJson.h> SoftwareSerial s(5,6); void setup() { s....
1
vote
0answers
1k views

How to send JSON on a http POST request using an ESP8266?

I'm working on a project aimed on sending alerts via SMS. I signed up for a SMS service that works via HTTP requests (REST standard). I need, then, to send data as JSON, so that their server processes ...
0
votes
1answer
341 views

Second item in array not gets assigned from struct object, ArduinoJson

I got the below code generated this amazing tool. const size_t capacity = JSON_ARRAY_SIZE(2) + JSON_OBJECT_SIZE(1) + JSON_OBJECT_SIZE(4) + 2*JSON_OBJECT_SIZE(7); DynamicJsonDocument doc(capacity); ...
0
votes
1answer
401 views

Can't Compile .ino using ArduinoJson Library

I am using an ESP32 NodeMCU for which I wrote working software before. This also occurs when I just try to compile without uploading, so no hardware problem. I am using the newest version of ...
0
votes
1answer
160 views

Global JsonObject (ArduinoJson)

I know a global JsonObject shouldn't be used, but I have my reasons. I have a JsonObject* functions and I want him to save the content of a file. With functions=new JsonObject(jsonBuffer.as<...
1
vote
0answers
185 views

Can't print out a field with ArduinoJSON

I'm trying to create a command interpreter. Allowed commands are stored in a JSON document inside SPIFFS. If I send an allowed command, it doesn't print the field associated with that value (end of ...
1
vote
0answers
37 views

About split string

Sorry my English is poor. I use nodemcu to get a json data. By this String alldata = client.readString(); But it turn this: HTTP/1.1 200 OK Server: nginx Date: Sat, 10 Aug 2019 04:53:16 GMT ...
1
vote
0answers
657 views

How to get Json String from URL?

I want to get JSON string from a URL which goes like this https://maps.googleapis.com/maps/api/directions/json?origin=7649+Paseo+Santa+Cruz&destination=SJSU&key=MY_API_KEY and here is my ...
0
votes
2answers
116 views

Firmware gets stuck at obj.printto(client) in esp32

I am using an ESP32 to capture some data and then sending it over using ArduinoJson. However, sometimes, the firmware gets stuck at the line where it is transmitting data at obj.printTo(client). I ...
1
vote
0answers
652 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. #...
2
votes
1answer
2k 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 ...
1
vote
0answers
69 views

Reducing json upload time

I'm using an ESP32 WROOM board to capture some data in the field and send it over using arduino json. However, the complete process of sending and receiving confirmation takes up around 12 seconds and ...
1
vote
2answers
1k views

Arduino WiFi Rev2 JSON String

I have been trying to use the WifiNINA library to access the JSON output from the following API using the WifiNINA library and the Arduino Wifi Rev2. This is the code that I have been using (it is an ...
1
vote
0answers
377 views

Can't parse large json file

For a project I've to parse a big json file. Unfortunately it does not work as expected. Here is the json file: { "data1": "...
-1
votes
1answer
196 views

How to upload sensor data on pubnub IOT with JSON Format?

I am trying to send MPU9250 sensor data to Pubnub IOT platform using node mcu, but not able to do it since the sensor data is not in JSON format. I know about publishing string but don't know about ...
1
vote
0answers
139 views

SerializeJson not working when using softserial

IDE:1.8.8 Board:Arduino UNO When I use the code below, I get result of print like this. { "result": [ { "ID": "01", "Value": [ "2", "1", "13" ] } ] } But when I use SoftwareSerial and in the setup ...
0
votes
1answer
1k views

How to interface MPU9250 and NodeMcu?

I am trying to send MPU sensor data to Pubnub IOT platform but not able to do it since there is some unknown problem. There is no error in code but following issue pops up in com port:- It looks like ...
0
votes
2answers
3k views

Parse a large json response with ESP8266

I'm doing a project where my Arduino uses an external ESP8266 wifi module (with AT firmware) to send http requests and receive server response. I'm trying to get an NBA scoreboard, and here's what my ...
0
votes
0answers
78 views

Losing value of variable

I am making a project involving the AutoConnect, ArduinoJSOn and LedControl libraries to fetch some values from an endpoint. Basically what I do is connect to the internet, fetch the values from a ...
0
votes
1answer
171 views

Which is a better? GPRS SIM800L or GPRS SIM900?

I will implementate the GPRS technologity in my Arduino project, but before buy the module, I want to know which is a better. If GPRS SIM800L or GPRS SIM900? My needs are send JSON array through POST ...
1
vote
0answers
321 views

append a String on ArduinoJson Object value

I've a json string request coming from server and I convert it into json object StaticJsonBuffer<500> jsonStaticBuffer; JsonObject& root = jsonStaticBuffer.parseObject(String(msg)); ...
-1
votes
1answer
269 views

Library Compiler Error - ArduinoJson

I have installed via the Arduino Library Manager a library called ArduinoJson. It seems to install fine and I have included the library in my sketch using: #include "ArduinoJson.h" But when I ...
1
vote
2answers
179 views

ArduinoJSON: Using a reference to a reference when parsing array of arrays

I started to play around with the ArduinoJson library to parse data I got from one of my APIs (the format of the JSON data I get from my API can be improved for sure, but the software I had to ...
0
votes
1answer
676 views

ESP8266 SPIFFS not saving correctly?

Hey all I am having some issues with the SPIFFS for this Wemos D1 mini ESP8266 controller. This is my Arduino sketch: #include <FS.h> #include <ArduinoJson.h> struct RGBLA { uint8_t R;...