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
Krzysztof Gabis
f16e4292f3
Using same code for determining serialization buffer size and serialization. Updated license year.
2015-06-26 00:12:06 +02:00
Krzysztof Gabis
83a0a3e133
Changed "json_serialize_to_buffer_r" to return number of written characters.
2015-06-25 12:11:01 +02:00
Krzysztof Gabis
f4538fa53d
Small change in test files.
2015-06-22 23:55:26 +02:00
Krzysztof Gabis
f4cfcd7699
Updates serialization example and readme.md
2015-06-22 19:30:06 +02:00
Krzysztof Gabis
6905548257
Pretty serialization + tests.
2015-06-22 16:53:19 +02:00
Krzysztof Gabis
1586461280
Adds function to change default allocator, fixes potential memory leak, refactoring.
2015-06-01 22:26:31 +01:00
Krzysztof Gabis
7fd8dc1c4c
UTF8 validation in json_value_init_string (+ tests).
2015-05-03 12:55:48 +01:00
Krzysztof Gabis
7ead2102b8
Merge pull request #29 from i-rinat/fixups
...
Handle failures.
2015-04-29 21:49:51 +01:00
Rinat Ibragimov
9782447a74
free temporary JSON_Value's on failure
2015-04-29 22:44:17 +03:00
Rinat Ibragimov
717e551cb2
free memory after json_value_init_string_no_copy() failure
2015-04-29 21:46:18 +03:00
Rinat Ibragimov
33b77673cb
check if ftell() returns -1
2015-04-29 21:27:41 +03:00
Krzysztof Gabis
2b4d17b337
Replaced strlen in process_string with pointer arithmetic.
2015-04-25 18:31:35 +01:00
Krzysztof Gabis
4a4cf7d795
Not parsing strings in json_value_init_string and *{set,dotset,replace,append}_string functions.
2015-04-06 10:12:04 +02:00
Krzysztof Gabis
0d5ac45286
Added additional null checks and tests.
2015-04-05 15:26:58 +02:00
Krzysztof Gabis
81c2fd0186
Merge pull request #23 from michaelsproul/no-exec-perms
...
Mark various files as not executable.
2015-03-01 09:36:38 +00:00
Michael Sproul
fcf0b810ba
Marked various files as not executable.
...
Also updated the .gitignore file to ignore object code,
which is particularly useful when using this project as a
git submodule.
2015-02-28 20:33:17 -08:00
Krzysztof Gabis
1058e3b2c0
Fixed bug in example code.
2014-11-24 21:04:15 +01:00
Krzysztof Gabis
f57f2d94bb
No longer escaping '/' when serializing.
2014-11-23 20:13:39 +01:00