Serge Zaitsev
fdcef3ebf8
Modernize ( #149 )
...
* add .clang-format for automated code formatting
* automatic code formatting
* move config.mk below all target to allow custom non-default build targets
* add license to the top of the file
* use correct header file guards syntax
* convert to single-header, header-only library
* update makefile to use jsmn as a header-only library
* update readme
* add changed from PR #143
* fix clang warnings
* add changes from PR #142
* add consts as per PR #134
6 years ago
Dario Lombardo
f40811c4de
Fix issue in documentation.
8 years ago
Serge A. Zaitsev
d0664f9a2e
changed jsmnerr_t type to int
9 years ago
Serge A. Zaitsev
226f318224
json token type enum doesn't start with zero value anymore, fixes #24
9 years ago
Serge A. Zaitsev
a0e2b876ca
including stddef.h in the jsmn.h, fixed issue #28
10 years ago
Wizard Tai
cf39341a39
jsmn.h:28:22: warning: commas at the end of enumerator lists are a C99-specific feature [-Wc99-extensions]
...
WITH:
-std=c89 -Wall -pedantic -Wno-declaration-after-statement
10 years ago
Gabriel Gritsch
db379ec124
Added "extern C" to use it with CPP.
11 years ago
Gabriel Gritsch
a89501b2fb
Integrate changes made by Serge Zaitsev.
11 years ago
Gabriel Gritsch
659842c65c
- Added possibility to specify the lenght of the input buffer (if not null-terminated).
...
- Added "extern C" to use it with CPP.
11 years ago
Gabriel Gritsch
385b42e740
- Added possibility to specify the lenght of the input buffer (if not null-terminated).
...
- Added "extern C" to use it with CPP.
11 years ago
Serge A. Zaitsev
86350f2bb1
a proper fix for signed comparison
11 years ago
Serge A. Zaitsev
3d6fb06ee9
fixed typo
12 years ago
Serge A. Zaitsev
37964b40ee
added optional parent token pointer support. Increases parsing speed
12 years ago
Serge A. Zaitsev
f3b41ae30c
fixed: superior node size is now an index, not a pointer (safe to realloc)
13 years ago
Serge A. Zaitsev
30f932772e
tested partial parser for strings, added primitive string parser test, fixed token allocation
13 years ago
Serge A. Zaitsev
443be365f6
removed JSON string and token array from parser internals, because they must not be saved between parse() calls
13 years ago
Serge A. Zaitsev
bed0a7a3e6
changed API: parse now is more flexible, but init jsut resets the parser; added new test macro to compate strings, fixed Makefile
13 years ago
Serge A. Zaitsev
4e869f7e9e
Complex types (objects and arrays) now have also size - number of child elements
14 years ago
Serge A. Zaitsev
c955364a95
All objects renamed using jsmn prefix to keep consistency and not be mixed with other json libraries. Demo is now called just demo.
14 years ago
Serge A. Zaitsev
7a027a4dd2
Token manipulation functions changes. size_t replaced with unsigned int.
14 years ago
Serge A. Zaitsev
d0d52f6847
Design: primitive type implemented as a replacement to boolean/number/null. String tokens point to the unquoted string
14 years ago
Serge A. Zaitsev
60509e2850
Design: rewritten using parser structure
14 years ago
Serge A. Zaitsev
a2755a7595
Design: some error codes added
14 years ago
Serge A. Zaitsev
daf93a0ebd
Feature: make difference between numbers and other primitives
14 years ago
Serge A. Zaitsev
b99663079c
Fix: errpos has got a correct type now
14 years ago
Serge A. Zaitsev
0568be6e0b
Demo separated from the jsmn code. Makefile changed. Some comments added
14 years ago
Serge A. Zaitsev
f22c2d30b7
Initial commit. Demo program is included in the jsmn.c code. Ugly names and no comments. Please, don't read this changeset
14 years ago