Questions tagged [json]

The tag has no usage guidance.

1
vote
2answers
160 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 ...
0
votes
0answers
23 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 ...
1
vote
0answers
52 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 ...
0
votes
1answer
77 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 ...
0
votes
2answers
40 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 ...
0
votes
0answers
51 views

ArduinoJSON v6- Add value to array

I have a JSON file stored in ESP8266, which I read need to add a value and save it back to file on ESP8266. I have an array at when saved at the first time as: JsonArray data = doc....
0
votes
0answers
17 views

RS256 JWT with Arduino

I am working on a project where I am implementing JSON web tokens to validate devices on a server. I have been unable to find many resources related to RS256 JWT with Arduino or similar devices. ...
0
votes
1answer
100 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
1answer
19 views

ArduinoJson v.6 equivalent of invalid() [closed]

What is the ArduinoJson 6 equivalent of this statement? root == JsonObject::invalid() I'm using as a condition of if parameters.
0
votes
0answers
45 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. #...
0
votes
2answers
1k views

Reading file from SPIFFS in nodemcu using ArduinoJson

#include <ArduinoJson.h> #include <FS.h> /* Set these to desired credentials in runtime */ struct Config { String ssid = ""; String pass = ""; bool hFlag = false; }; void ...
0
votes
1answer
225 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
0answers
49 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
1k views

Arduino JSON foreach loop

I'm trying to extract values using ArduinoJson. The values aren't fixed, therefore I need to use the foreach loop. I'm trying this, but I can't seem to use the values like I could with. root["0"]["...
-1
votes
1answer
42 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 ...
0
votes
2answers
386 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
45 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
0answers
37 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
56 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 ...
0
votes
0answers
62 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)); ...
0
votes
0answers
129 views

Parsing multiple jsonObjects with Arduinojson and return a list of values

I am building a table tennis score board which parses json objects with ID and names of players to let the players pick their name inside a menu and later on submit the scores to my server. But I am ...
1
vote
2answers
77 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
297 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;...
0
votes
0answers
191 views

JSON woes: parsing JSON with esp8266, can this be more elegant?

A few years back I wrote a program that pulled bus time data from the NYC MTA's "bus time" API and posted it on a wifi-connected OLED on my wall. All was well for a few years, but they changed the ...
1
vote
1answer
4k 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 ...
0
votes
1answer
42 views

String class summation disappears the right operand

I intend to create a function to jsify sensors' content and save it on a SD-card or send through a http client. Except for the Serial.println's, the function is transcripted below. String jsonificar(...
1
vote
1answer
71 views

Arduino Uno with Adafruit CC3000

I am using Arduino Uno with Adafruit CC3000 wifi shield to connect to the internet and get data for Arduino. Everything works fine but I can't figure out how to use HttpClient library. The code is: #...
-2
votes
1answer
334 views

Can't read JSON data from client (webpage) with Arduino Leonardo ETH

I'm reading a digital pin and count how many times that pin is enable, after that the data is sent in JSON format. All is working well till here. But I want to introduce a value from webpage to ...
0
votes
1answer
1k views

Unable to parse my JSON Data in Arduino IDE

i want to get my thingSpeak channel data into arduino by performing GET request every things works fine.Further i used Arduinojson lib to parse the JSON but i am getting failed every time when i try ...
1
vote
2answers
808 views

POST to server using ESP8266 module- Arduino Uno- AT+ commands

I'm trying to send a set of data in Json format to a server I have set up which has a specific URL and an access token. The server requires a POST command. So my final URL is: http://myurl.com/...
2
votes
1answer
2k 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 ...
0
votes
0answers
182 views

Parse JSON data from String [duplicate]

I'm getting JSON data using HTTP methods in Arduino and storing in String Object. The data is: { "item": { "Identity": { "Id": "327681", "ItemId": "64006A962B71A1E7B3A0428637DA997C....
1
vote
0answers
1k views

Convert String data To char Array in Arduino

I'm able to get json data and storing in String object, now i want to convert string into Char Array for parsing json data I'm tried with this code, but it is not responding String data = http....
0
votes
1answer
245 views

Arduino parsing JSON

I have created an API in Ruby on Rails and it send the following JSON response: {"sun_position":{"altitude":"32.46","azimuth":"223.93"}} I'm able to successfully hit the API and store the response. ...
-2
votes
1answer
329 views

Arduino JSON extract using ArduinoJSON Library [closed]

I'm having a problem extracting the Object/Array from this sample json [ { "sensor":"gps1", "time":1351824120 }, { "sensor":"gps1", "time":1351824120 } ] Would anyone ...
1
vote
1answer
4k views

How to pass JsonObject from ArduinoJson to ESP8266WebServer object?

I am learning the ArduinoJson.h library and creating jsonOject: JsonObject& prepareResponse(JsonBuffer& jsonBuffer) { JsonObject& root = jsonBuffer.createObject(); JsonArray& ...
-1
votes
1answer
4k views

'DynamicJsonBuffer' was not declared in this scope

I have this code: #include <ESP8266WiFi.h> #include <ESP8266HTTPClient.h> const char* ssid = "xxxx"; const char* password = "xxxx"; bool a = false; bool b = true; int heldVal = 0; ...
-1
votes
1answer
880 views

How to get the server response when I post to a web api [closed]

I have an arduino which is using a TCPClient to post JSON messages to a web api. First, I have pasted the code below to see if people have general comments about the method I am using to do so. I am ...
0
votes
1answer
466 views

Possible ArduinoJson bug on ESP8266?

I'm making a small IOT project using the ESP8266 in which I make 2 API calls: api.openweathermap.org for weather data api.timezonedb.com The request logic is the same for both calls, the only ...
0
votes
1answer
153 views

Urgent need of help splitting a JSON formatted string received by UDP

I guess that my problems are because I'm new to C, but after spending three evenings without success I thought I'd give it a try to ask here! I receive a JSON-formatted string in a UDP message. It ...
0
votes
1answer
211 views

Parse an element that consists of an array using ArduinoJson [closed]

I want to parse an json element that consists of an "array". In this case solar->solardata->calculatedconditions->band[0-7] How can i do this? My attempt was: String data = root["solar"]["...
0
votes
2answers
93 views

Data not updated in real time

In my recent project, working with JSON and Arduino. Till now, I am getting proper JSON data and add this one into Arduino data. But here I face one problem. My data are not updated in real time. For ...
0
votes
2answers
2k views

How to get different parsed JSON data?

In my recent project, I have to parse incoming JSON data in Arduino and I successfully did it. But it is only for one constant data string. For example, if my incoming JSON string like: {"TPS":"0.40"...
3
votes
2answers
324 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. ...
1
vote
1answer
174 views

Sending JSON message to web api via post. Why does HTTP 1.0 versus 1.1 make a difference?

I am sending a message to a web api call every xx seconds. I could not get it to work at all until I changed the header from HTTP 1.1 which is what I was using to HTTP 1.0. Then, it started working. ...
1
vote
2answers
60 views

Problem regarding getting split data of JSON - Another issue

In my recent project, I'm working with Arduino and JSON. I've successfully split the JSON data I want. My JSON data length is fixed. So, I used the length() function and I'm getting the length of my ...
0
votes
1answer
340 views

How can I split data coming from JSON?

In my recent project, I'm working with Arduino and JSON. Now, I get data from JSON and I can able to receive in Arduino side. Below one is my Arduino code: #include<LiquidCrystal.h> ...
0
votes
1answer
104 views

Not able to add JSON data to Arduino data

In my recent project, I'm working with Arduino with JSON. I made software on JSON. Now, I want to send data from this software to my Arduino. Serial communication is done between Arduino and JSON. ...