json parsing working alone and not with another code

I'm quite sure that you're running out of memory. Every single variable used in a function needs memory when the function is called. When you nest functions, you need to add it all up. Function calling might also add some bytes.

You have only 12 bytes left and that is simply not enough.

First step would be to move all fixed strings to PROGMEM; that will basically free RAM at the expense of flash memory.

And you might be better of looking for another model with more ram.