Commit Graph

170 Commits

Author SHA1 Message Date
Krzysztof Gabis
bef4969d25
Merge pull request #91 from JetstreamRoySprowl/master
Fix signed char fed to isspace
2017-12-09 11:12:33 +01:00
Roy Sprowl
385b476a30 Fix signed char fed to isspace 2017-12-07 21:51:47 -08:00
Krzysztof Gabis
b87a27c15c
Merge pull request #89 from lunixoid/master
Fixed condition
2017-10-28 00:05:58 +01:00
Roman Kalashnikov
f1bb6e7fbe
Fixed condition 2017-10-28 01:23:15 +03:00
Krzysztof Gabis
e112626cb5 Create LICENSE file
issue #87
2017-10-11 18:50:31 +01:00
Krzysztof Gabis
243bccb51d Merge pull request #85 from tbeu/fix-typos
Fix typos
2017-10-02 08:01:45 +01:00
tbeu
1839d0de54 Fix typos 2017-10-02 08:47:53 +02:00
Krzysztof Gabis
4e8a901242 Changes float print format, removes array/object capacity limit, doesn't accept inf/nan numbers. 2017-09-16 16:07:43 +01:00
Krzysztof Gabis
e18751499d Adds a simple memory leak test. 2017-09-14 21:01:32 +01:00
Krzysztof Gabis
e1292a0e3c Small refactoring in parse_utf16 (+ tests) and typo fix in json_array_remove. 2017-09-14 10:00:24 +01:00
Krzysztof Gabis
578b25e590 Counting malloc and free calls to avoid memory leaks (#82). 2017-09-06 10:13:23 +01:00
Krzysztof Gabis
343fe13f17 Order of items in an array is preserved after removing an item.
Issue #81
2017-09-06 10:02:52 +01:00
Krzysztof Gabis
d485b068c7 Fixes a memory leak (issue #82). 2017-09-04 19:56:17 +01:00
Krzysztof Gabis
e410fc7c33 Increases MAX_NESTING of json objects/arrays to 2048.
Fixes #75
2017-05-08 19:55:29 +01:00
Krzysztof Gabis
dd9eed2af2 Updates README.md because github changed it's markdown renderer. 2017-04-02 10:05:27 +01:00
Krzysztof Gabis
20ad63f8ff Fixes memory leaks.
Thanks to Thales de Carvalho for finding this and submitting a patch.
2017-03-09 20:59:22 +00:00
Krzysztof Gabis
ba2a854c27 Fixes undefined behaviour as reported by clang ub sanitizer.
Issue #72
2017-03-01 19:33:40 +00:00
Krzysztof Gabis
2bfa4153db Updates copyright. 2017-02-18 16:41:14 +00:00
Krzysztof Gabis
96150ba1fd Removes dependency on sscanf and prints line numbers in tests output.
Some libraries don't have sscanf and since it wasn't used heavily it was easily replaced with a custom function. This doesn't mean that sscanf won't be used in future though (but I'll try to avoid it).
Fixes #68. Thanks to @compulim for initial work on this issue.
2017-02-18 15:26:22 +00:00
Krzysztof Gabis
cb14736e96 Checking errno after strtod call. 2017-01-06 21:35:29 +01:00
Krzysztof Gabis
defb57f2d3 Some extra null checks (issue #60). 2016-12-30 23:04:14 +01:00
Krzysztof Gabis
f419334a32 Adds links to parent values and values used to wrap objects/arrays. Assigning a value to 2 objects/arrays returns an error now.
Addresses issues #66 and #30.
2016-12-29 23:50:20 +01:00
Krzysztof Gabis
dcf85b88c8 Support for UTF-8 with BOM.
Fixes #65
2016-12-08 21:40:52 +00:00
Krzysztof Gabis
b61c03e614 Updates README.md. 2016-09-25 10:49:58 +01:00
Krzysztof Gabis
1bcab43c38 Merge pull request #55 from jmlemetayer/unsigned
Add support to print unsigned integers
2016-09-22 22:43:26 +01:00
Jean-Marie Lemetayer
d198f6ebfe Add support to print unsigned integers
Else numbers between INT_MAX and UINT_MAX will be printed using double format
2016-09-20 16:48:13 +02:00
Krzysztof Gabis
642f0cb4f5 Merge pull request #52 from t-k-/escape
Further escape \x00 - \x1F control characters.
2016-09-10 09:25:41 +01:00
t-k-
7b90bbbf24 Further escape \x00 - \x1F control characters. 2016-09-08 21:01:02 +08:00
Krzysztof Gabis
c22be794ce Using braces in every if statement + whitespace cleanup. 2016-08-23 20:57:10 +01:00
Krzysztof Gabis
a1c356eaa9 Adds functions to check if object has value with a certain name (and optionally type).
This closes #42.
2016-07-05 12:23:17 +02:00
Krzysztof Gabis
bcefc459dd Changes skip_quotes return type to JSON_Status. 2016-07-05 11:52:24 +02:00
Krzysztof Gabis
8075050bc1 Fixes #43 2016-07-05 11:45:41 +02:00
Krzysztof Gabis
21c0364048 Merge pull request #41 from jacobenget/master
Fix for array element validation
2016-06-06 21:11:05 +01:00
Jacob Enget
1c1b77aa7e Fixes typo causing problems with array element validation 2016-06-06 13:45:14 -05:00
Jacob Enget
9d6fbde0c4 Adds test that fails when validating array elements 2016-06-06 13:44:44 -05:00
Krzysztof Gabis
f60ddcd05b Adds missing character (in a comment). 2016-04-23 12:15:13 +02:00
Krzysztof Gabis
5c4a11b036 Removes trailing whitespace. 2016-04-23 12:11:25 +02:00
Krzysztof Gabis
473c7f3d8d Adds json_object_get_value_at function to access values in objects in O(1) time.
Also adds some missing null checking.
2016-04-23 11:59:34 +02:00
Krzysztof Gabis
77ef99571e Avoiding _CRT_SECURE_NO_WARNINGS redefinition. 2016-04-23 11:42:09 +02:00
Krzysztof Gabis
0c04a7e678 Removes unnecessary SKIP_WHITESPACES. 2016-04-16 12:35:44 +01:00
Krzysztof Gabis
f860d3dd1b Accepting json texts that are not objects or arrays.
According to RFC 7159 it's now valid to accept json texts that are not object or arrays.
Also reordered realloc opeartion in json_object_add to not be called if key already exists.
2016-04-16 12:30:46 +01:00
Krzysztof Gabis
19c1175064 Fixes a bug where fopen() error was being ignored. 2016-03-03 18:52:30 +00:00
Krzysztof Gabis
d7726760e0 Merge pull request #35 from vovanec/patch-1
Fixed error condition on malloc failure.
2016-02-08 20:50:21 +01:00
Volodymyr Kuznetsov
c27133715b Fixed error condition on malloc failure.
Fixed error condition on malloc failure, it looks like it should be temp_values, not temp_names.
2016-02-05 13:31:05 -08:00
Krzysztof Gabis
c9b920c4a3 Fixes a bug in json_array_remove and adds relevant tests (thanks to KB for finding this).
Also - it's 2016, time to update copyright notices, yay!
2016-01-13 20:47:47 +00:00
Krzysztof Gabis
8324ff92bf Escaping / to make json embeddable in xml\/html. 2015-11-08 16:34:34 +00:00
Krzysztof Gabis
849f00728b parson should compile with c++ compilers (again). 2015-10-05 08:37:25 +01:00
Krzysztof Gabis
86a5a20856 Adds comments regarding memory management. 2015-07-15 22:29:14 +01:00
Krzysztof Gabis
18761d99ff Checking if json_serialization_size failed. 2015-07-03 19:12:48 +01:00
Krzysztof Gabis
8eb5eab54d Checking if serialization_size is <0 before casting from int to size_t. 2015-07-01 19:24:16 +01:00