1
0
mirror of https://github.com/kgabis/parson.git synced 2025-01-28 06:32:55 +08:00

17 Commits

Author SHA1 Message Date
Krzysztof Gabis
e4ac46318e Fixed memory leak in example. 2014-10-08 14:45:39 +02:00
Krzysztof Gabis
638190d6a0 Merged changes from parson-devel (serialization, copying, comparing, validation, creating values). 2014-10-07 21:11:29 +02:00
Krzysztof Gabis
6e9e934b5a Bugfix in parsing escaped characters (+ additional tests to prevent this bug in future).
Thanks to Joseph Werle for bringing attention to it.
2014-06-10 20:59:35 +02:00
Krzysztof Gabis
c707051778 Added surrogate pairs support (JSON support is full now), removed PARSON_VERSION macro. 2014-04-10 17:00:40 +02:00
Krzysztof Gabis
d5adf4e291 Added functions to parse file with comments and new tests.
json_parse_value_with_comments and json_parse_string_with_comments replace comments with whitespaces before parsing. Supported comments are: /* */ and //
2013-11-30 20:22:16 +01:00
Taro Kobayashi
155f7f0639 added test that will fails on android 2013-02-07 17:23:57 +09:00
Krzysztof Gabis
c24b1a1ad0 Fixed type mismatch in array indexing variables, updated readme file.
Also removed trailing whitespace.
2012-12-02 18:33:00 +01:00
Krzysztof Gabis
457fa1100f Small code cleanup, narrower example code in tests and readme. 2012-11-24 20:59:16 +01:00
Krzysztof Gabis
aaf1d45f16 Code refractoring.
Details:
- Increased STARTING_CAPACITY from 10 to 15.
- Added 2 macros: skip_char and skip_whitespaces.
- Added json_object_nget_value function, which removes neccessity to allocate new string when using dotget functions.
- Removed parson_strdup function, it was called only once and could be easilly replaced with appropriate call to parson_strndup.
- Renamed skip_string to skip_quotes, which is a more appropriate name, and made it work on a passed pointer to a string, which is much like skip_char and skip_whitespaces.
- Removed copy_and_remove_whitespaces, it was unncessary, and could be easily replaced with skip_whitepsaces macro.
- Merged parse_escaped_characters and get_string to get_processed_string, which makes more sense.
- Changed is_decimal implementation, to avoid unncessary string duplicating.
- Removed string copying in parse_number value and json_parse_string, since it was unncessary.
2012-11-04 17:45:52 +01:00
Krzysztof Gabis
202f16cc5c Additional code cleanup.
Removed redundant typedefs, renamed JSON_value_t to JSON_Value_Type and JSON_value_value to JSON_Value_Value to make names more consistent across project. Added project's name and url above license.
2012-11-03 19:52:49 +01:00
sduclos
684096eb0f code clea up 2012-11-03 08:19:28 -04:00
Krzysztof Gabis
2684eeb360 Not parsing hex and octal values, refractoring, code cleanup, new tests.
Also changed parson_strndup and parson_strdup to be static.
2012-10-24 10:42:25 +02:00
Krzysztof Gabis
120f5a08da Defined malloc and free as macros, also small refractoring.
And changes to the readme file.
2012-10-22 19:20:02 +02:00
Krzysztof Gabis
5edab75bdc Checking malloc errors, added limits on nesting and object/array size.
Also small refractoring and one new test regarding nesting.
2012-10-19 16:24:24 +02:00
Krzysztof Gabis
410807850e Fixed some compatibility issues with C++ compilers.
Added error type to json value types. Also implemented strdup and strndup, since they can be problematic and are not implemented everywhere.
2012-10-18 18:36:58 +02:00
Krzysztof Gabis
2740213c5c Renamed bool to boolean.
Naming variables bool is a poor idea, even in C.
2012-10-18 15:25:11 +02:00
Krzysztof Gabis
de829803e3 Initial commit. 2012-10-16 19:56:54 +02:00