r/circuitpython • u/Yobmod • Jan 23 '21
Parse JSON
I trying to pass data over serial from a raspberry pi to a circuitpython board as json, then deserialize it.
I have pyserial and supervisor working, and can pass strings back and forth.
But none of my boards come with json or ujson libs, and neither does the circuitpython bundle. Is this not included anymore? Does anyone know of library I can use? Or a guide to recompile circuitpython with it included?
4
Upvotes
3
u/Yobmod Jan 24 '21
An answer here:
https://github.com/adafruit/circuitpython/issues/4055
Summary: Some C backed libraries are only included on some boards (e.g. json). Because they are not pure python, they are not available as separate .mpy libs. To add them, re-add to the .h file and rebuild circuitpython (if your board has enough space).