majerle / lwjson Goto Github PK
View Code? Open in Web Editor NEWLightweight JSON parser for embedded systems
Home Page: https://majerle.eu/projects/lwjson-lightweight-json-parser
License: MIT License
Lightweight JSON parser for embedded systems
Home Page: https://majerle.eu/projects/lwjson-lightweight-json-parser
License: MIT License
This is to be used by user prior input token set allocation.
Using this feature, user can check if input is valid and can understand how many tokens are necessary for successful JSON parsing.
prv_skip_blank
has the following comment:
Skip all characters that are considered *blank* as per RFC4627
However, \f has never been considered a whitespace character in RFC4627.
Also applies to streaming mode.
To be able to generate JSON string output from input tokens.
should this macro be adding one in the return value?
lwjson/lwjson/src/include/lwjson/lwjson.h
Line 229 in c61a7bd
{ "HasExpiry":true, "Expires":1661535805452, "ServerTime":1661535505452, "Nonce":"968642096" }
LwJSON returns error if there is a comment between key and value, as:
{"key":/* Comment */"value"}
long long integers are not correctly supported due to how prv_parse_number is using lwjson_real_t for parsing integers. Even if lwjson_real_t is defined as a double, this only allows storing up to 53 bit integers (assuming you are using a system which supports IEEE 754 double precision floating point numbers). I propose adding a second variable handle the value as an integer. I will follow up with a pull request.
To think supporting extended JSON5 features:
Use LwMEM library for dynamic token generation if enabled by user. Not necessary in default mode.
When unicode characters are part of json string, length is wrongly calculated.
Hi @MaJerle,
would be nice to add a parser function to manage an input stream data. What do you think about?
Best regards,
Giulio Dalla Vecchia
Will you have JSON-RPC 2.0 ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.