Getting data from json from in SD card on ethernet shield

Hello folks, I’m doing a project that uses arduino web server to control several pumps to mix liquid. I stored two jason files in SD card and inserted the SD card into the solt on ethernet shield. I can get the data correctly when I’m not adding html code and start the websever. But when I added html code in loop and start the web sever, I got data incorrectly.

The name of two json files are recipe.json and ingredients.json. I print the data I got on serial monitor, and found I can get the data from ingredients.json correctly but the data from recipe.json is completely incorrect.

I attached the .h file that I used to parse json from SD card.

Is the .h file have some issue to work with ethernet library and case the issue?

Thanks for your help

JsonInit_.h (543 Bytes)

The header file you posted defines some functions, but does not implement them. We need to see the cpp file that goes with it AND your sketch, and we need to know which Arduino you have.

At a guess, though, you don't have enough memory to do what you are trying to do.

Why are you storing the data in the ridiculously wordy JSON format?

Thanks for quick response. I used json because I feel like it is nice looking formatted data layout. This is my first arduino project. Is there an easier solution for storing the data?

Thank you.

yxr861231:
Thanks for quick response. I used json because I feel like it is nice looking formatted data layout. This is my first arduino project. Is there an easier solution for storing the data?

Structs are much, much easier to work with IMHO. The only time you should use JSON is if you're interfacing with a webserver that requires you to use it.