JSON Parser
PhreaK
Posts: 966
For those looking for a JSON parser, here's a C -> NetLinx port of the fantastic jsmn parser.
https://github.com/ciasia/jsmn
The readme has the full rundown on what it does, however the brief version is it will token any valid JSON you can fit into a character array, letting you then parse in a way that suits your application. Some sample of building state machines around it's output can be found here. Rudimentary parsers where you iterate over tokens of more simplistic structures will work equally as well.
https://github.com/ciasia/jsmn
The readme has the full rundown on what it does, however the brief version is it will token any valid JSON you can fit into a character array, letting you then parse in a way that suits your application. Some sample of building state machines around it's output can be found here. Rudimentary parsers where you iterate over tokens of more simplistic structures will work equally as well.
1
Comments
I like that it's slamming those structs around between functions. I did that once and felt kind of dirty about it. Validation.
HAHAHAHAHAHA!
Hi I am getting compilation error saying Unreceognized node type [431]
That usually means that stack_var or local_var is not the first line in a scope