dacez / zzzjson Goto Github PK
View Code? Open in Web Editor NEWThe fastest JSON parser written in pure C
License: Other
The fastest JSON parser written in pure C
License: Other
There is an inconsistency in the implementation of the string to number functions.
Only the zj_strToInt
function uses the s
variable in the string conversion.
The other functions use the input argument.
static inline int zj_strToInt(const char *str, zj_Size len) {
char s[128] = {0};
memcpy(s, str, len);
return atoi(s);
}
static inline long zj_strToLong(const char *str, zj_Size len) {
char s[128] = {0};
memcpy(s, str, len);
return atol(str);
}
static inline long long zj_strToLongLong(const char *str, zj_Size len) {
char s[128] = {0};
memcpy(s, str, len);
return atoll(str);
}
static inline double zj_strToDouble(const char *str, zj_Size len) {
char s[128] = {0};
memcpy(s, str, len);
return atof(str);
}
I didn't really understand how you parsed the unicode in the following line of code:
zj_consumeStr function.
Can you please explain this part? What are the magic numbers; 0xDC00
, 0xDFFF
, 0xD800``0xDBFF
that are being used here and why these checks?
I am using this library as a reference to build a lexer for another parser. Help would be appreciated
Hi,
This looks great, but I'm not sure if/how am I allowed to use zzzjson.
Could you perhaps add a license?
Thanks,
Eli
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.