JSMN is the "jasmine" JSON parser
Questions tagged [jsmn]
6 questions
12
votes
4 answers
How to parse a small JSON file with jsmn on an embedded system?
I need to parse a small JSON file on an embedded system (only 10K RAM/flash). The JSON is:
{
"data1":[1,2,3,4,5,6,7,8,9],
"data2":[
[3,4,5,6,1],
[8,4,5,6,1],
[10,4,5,3,61],
[3,4,5,6,1],
[3,4,5,6,1],
[3,4,5,6,1]…

Vincent Zhou
- 503
- 1
- 6
- 17
3
votes
0 answers
Problems with JSMN API
I'm struggling to figure out how the jsmn library works. Here is my current code and what it produces. My problem is based only in the derefBy function
#include
#include
#include
#include
#include…

Brad
- 31
- 4
2
votes
1 answer
Aren't header-only C "libraries" wasteful?
I'm looking at a header-only C "library": https://github.com/zserge/jsmn/blob/master/jsmn.h
As far as I can understand, this code will be compiled into every object file where the .c file includes jsmn.h, wasting space.
(The file's function…

fadedbee
- 42,671
- 44
- 178
- 308
0
votes
1 answer
Getting Segmentation fault when trying to read a json file
I'm trying to parse a json file using jsmn but I get segmentation fault when I run my application. I'm using C and compiling on Ubuntu machine.
Please find the code snippet below:
#include
#include
#include
#include…

user2156513
- 113
- 7
0
votes
1 answer
Novice Query on C strings Jsmn jason parser
I have started by programming with Golang, and things looked easy.Then I stumbled on JSON parser of C (JSMN) so that I can try CGO.
Here's the code lines (11 and 46) from this example:
static const char *JSON_STRING =
"{\"user\": \"johndoe\",…

tony
- 33
- 3
0
votes
1 answer
How to build C scripts with jsmn?
I'm trying to write a simple ANSI C script that uses cURL to do some REST calls and then uses Jsmn to parse the JSON response bodies. I've got all the cURL parts working, but I can't figure out how to get things linked up properly with jsmn. So to…

soapergem
- 9,263
- 18
- 96
- 152