SPDX-License-Identifier is useful to clarify the license (both for humans and
machines), especially when the code of the project is embedded into other
projects.
ref: https://spdx.org/using-spdx-license-identifier
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
json_parse_value_with_comments and json_parse_string_with_comments replace comments with whitespaces before parsing. Supported comments are: /* */ and //
Details:
- Fixed bug, where json_object_nget_value returned wrong values.
- json_object_get_count returns a number of object's name-value pairs.
- json_object_get_name returns a name at a specific index.
- Both functions allow iterating over every value in a object.
- Changed max capacity for JSON_Array and JSON_Object (they're not equal anymore).
- Added functions to resize object and array, which are also used after parsing to "trim" them to their real lengths.
- Added try_realloc function.
- Added SUCCESS and ERROR macros to make code more readable.
- 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.