JSON Parser
PhreaK
Senior Member
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.
Comments
-
Thanks for the share, really appreciated
-
whoa.
I like that it's slamming those structs around between functions. I did that once and felt kind of dirty about it. Validation. -
whoa.
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]
-
@fathrudeen said:
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
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums
