GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing cpp.libhunt.com — JSMN Alternatives - C++ JSON | LibHunt JSMNJsmn is a world fastest JSON parser/tokenizer. This is the official repo replacing the old one at Bitbucket
Take the C++ Developer Survey
- About 6 minutes on the tools, libraries and AI you use with C++. You get the results by email.
Take the survey »
Popularity
7.8
Declining
Activity
0.0
Stable
Stars
4,185
Watchers
145
Forks
815
Last Commit
Description
jsmn (pronounced like 'jasmine') is a minimalistic JSON parser in C. It can be
easily integrated into resource-limited or embedded projects.
Code Quality Rank:
L3
Programming language: C
License: MIT License
Latest version: v1.1.0
JSMN alternatives and similar libraries
Based on the "JSON" category.
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
Promo
www.saashub.com
* Code Quality Rankings and insights are calculated and provided by Lumnify.
Do you think we are missing an alternative of JSMN or a related project? Popular ComparisonsREADMEJSMNjsmn (pronounced like 'jasmine') is a minimalistic JSON parser in C. It can be easily integrated into resource-limited or embedded projects. You can find more information about JSON format at json.org Library sources are available at https://github.com/zserge/jsmn The web page with some information about jsmn can be found at http://zserge.com/jsmn.html PhilosophyMost JSON parsers offer you a bunch of functions to load JSON data, parse it and extract any value by its name. jsmn proves that checking the correctness of every JSON packet or allocating temporary objects to store parsed JSON fields often is an overkill. JSON format itself is extremely simple, so why should we complicate it? jsmn is designed to be robust (it should work fine even with erroneous data), fast (it should parse data on the fly), portable (no superfluous dependencies or non-standard C extensions). And of course, simplicity is a key feature - simple code style, simple algorithm, simple integration into other projects. Features
DesignThe rudimentary jsmn object is a token. Let's consider a JSON string:
It holds the following tokens:
In jsmn, tokens do not hold any data, but point to token boundaries in JSON string instead. In the example above jsmn will create tokens like: Object [0..31], String [3..7], String [12..16], String [20..23], Number [27..29]. Every jsmn token has a type, which indicates the type of corresponding JSON token. jsmn supports the following token types:
Besides start/end positions, jsmn tokens for complex types (like arrays or objects) also contain a number of child items, so you can easily follow object hierarchy. This approach provides enough information for parsing any JSON data and makes it possible to use zero-copy techniques. UsageDownload
Since jsmn is a single-header, header-only library, for more complex use cases
you might need to define additional macros.
APIToken types are described by
Note: Unlike JSON data types, primitive tokens are not divided into numbers, booleans and null, because one can easily tell the type using the first character:
Token is an object of
Note: string tokens point to the first character after the opening quote and the previous symbol before final quote. This was made to simplify string extraction from JSON data. All job is done by
This will create a parser, and then it tries to parse up to 10 JSON tokens from
the A non-negative return value of If something goes wrong, you will get an error. Error will be one of these:
If you get Other infoThis software is distributed under MIT license, so feel free to integrate it in your commercial products.
Do not miss the trending, libraries, news and articles with our weekly report.
Spin The Wheel Of Names
for a cryptographically secure random name picker.
Schedule a when to meet poll. |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |