Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post existing JSON #255

Open
MaikelTK opened this issue Oct 31, 2018 · 1 comment
Open

post existing JSON #255

MaikelTK opened this issue Oct 31, 2018 · 1 comment

Comments

@MaikelTK
Copy link

Hello,
I am creating a project where I use an ESP32 to read multiple sensor values.
Currently I use the arduinojson library to put all the data I need into a json file.

A) Is it possible to use the aRest library with this json file I already created? If so, how?
B) Or is it possible to create a json file with the aRest library and add multiple values to it?
For example I tried some of the aRest example code to GET an integer value through the postman application. But I can only get 1 integer from the GET command and I need to get more.

Any help would be appreciated, this is my first time working with JSON and REST.

@K1ngjulien
Copy link

you could save the JSON as a string in a variable and then expose it with rest.variable("data", jsonstring)

https://arduinojson.org/v5/api/jsonobject/printto/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants