225 Commits (0c3588330a3edbf287e7f969231b8bbed2ed6375)

Author SHA1 Message Date
  Simon Resch 0c3588330a Set error codes for truncating int conversions 10 months ago
  Simon Resch 8c13801f2c Explicitly handle NaN values when converting to int 10 months ago
  Eric Hawicz 077661f3d1 Fix issue #823: add back json_number_chars, but only because it's part of the public API. 2 years ago
  Alexandru Ardelean a86d7a8f5a json_object: introduce json_object_array_insert_idx() API function 4 years ago
  Matthias Gatto 9803032b9d add JSON_C_TO_STRING_COLOR option 3 years ago
  Eric Haszlakiewicz 9749b0cb66 When serializing with JSON_C_TO_STRING_PRETTY set, keep the opening and closing curly or square braces on same line for empty objects or arrays. Issue #778. 3 years ago
  Daniel Danzberger 213bb5caa1 Fix memory leak with emtpy strings in json_object_set_string 3 years ago
  Eric Hawicz 0b937f6173
Merge pull request #758 from c3h2-ctf/context 3 years ago
  Tobias Stoeckmann 0c0d901443 Preserve context if out of memory 3 years ago
  Eric Haszlakiewicz e244146dfd Remove single quote from #error line. Fixes issue #761 3 years ago
  BonsaY 716978f20d Code style removed unneeded double-quotes 3 years ago
  Tobias Stoeckmann 6e533471a8 Fix error messages 3 years ago
  Eric Hawicz 66cce0a1d7
Merge pull request #739 from rouault/avoid_unsigned_integer_overflow 3 years ago
  Even Rouault 82d9433813
json_object_copy_serializer_data(): add assertion 3 years ago
  Even Rouault 296db618e9
json_escape_str(): avoid harmless unsigned integer overflow 3 years ago
  Eric Haszlakiewicz 2d2382d709 Add linkhash accessor functions (lh_table_head(), lh_entry_next(), etc...) to pave the way for making the lh_table and lh_entry structure opaque in the future. 3 years ago
  Eric Haszlakiewicz 320548caf6 Drop the REFCOUNT_DEBUG code, it hasn't been used in ages. 3 years ago
  Robert Bielik a66a6cc51b Fix for clang ub sanitizer 3 years ago
  José Bollo 8bf3b45a29 Really use prefix JSON_C_OBJECT_ADD_* 4 years ago
  Eric Haszlakiewicz 6a0df2609e Merge some old work to include (some of) PR #464 into the current master branch. 4 years ago
  ihsinme c456963110
Update json_object.c 4 years ago
  Tobias Stoeckmann e50154f615 Cap string length at INT_MAX. 5 years ago
  Tobias Stoeckmann 583911a66c Aligned comment in _json_object_new_string 5 years ago
  Aram Poghosyan 0ffb384409 Fixed warnings 5 years ago
  Eric Haszlakiewicz 8c7849e6e3 Eliminate use of ctype.h and replace isdigit() and tolower() with non-locale-sensitive approaches. 5 years ago
  Eric Haszlakiewicz bfec9c8685 Take a hint from PR #464 and use json_object_new_string_len() to avoid a needless extra strlen() call. 5 years ago
  Marc 4a23d3413d
Fix "may be used uninitialized" Release build failure 5 years ago
  Eric Haszlakiewicz 6542d33cd1 Issue #641: Add a cast to void * to address some theoretically undefined printf behavior. 5 years ago
  Eric Haszlakiewicz 6465e74020 Use constants referring to the signed integer types when setting SSIZE_T_MAX. 5 years ago
  Eric Haszlakiewicz f23486a321 In the json_tokener_state_number case, explicitly adjust what "number" characters are allowed based on the exact micro-state that we're in, and check for invalid following characters in a different way, to allow a valid json_type_number object to be returned at the top level. 5 years ago
  Eric Haszlakiewicz e26a1195f4 Add json_object_array_shrink() (and array_list_shrink()) and use it in json_tokener to minimize the amount of memory used. This results in a 39%-50% reduction in memory use (peak RSS, peak heap usage) on the jc-bench benchmark and 9% shorter runtime. 5 years ago
  Eric Haszlakiewicz 0710c835a1 Reformat the json_object-split branch with clang-format 5 years ago
  Eric Haszlakiewicz 5ebfeaedc5 Drop the _delete field from struct json_object and call the type-specific delete functions directly from json_object_put. (Thanks @dota17 for the suggestion in PR #632!) 5 years ago
  Eric Haszlakiewicz 4c10712114 Drop the useless "char data[1]" from struct json_object. Fix a typo in a comment. 5 years ago
  Eric Haszlakiewicz 66d91fdf86 The split of json_object into type-specific sub-structures is now functionally complete. 5 years ago
  Eric Haszlakiewicz c4cc673071 More fixes for old MSVC builds. 5 years ago
  Eric Haszlakiewicz 0fc9d91277 Kick json_type_string out of struct json_object. 5 years ago
  Eric Haszlakiewicz 9ecb1222bd Kick json_type_int and json_type_double out of struct json_object. 5 years ago
  Eric Haszlakiewicz 0351bb55c8 Declare variables earlier, to appease Visual Studio 2010. 5 years ago
  Eric Haszlakiewicz d1f83bf5ea Kick json_type_boolean out of struct json_object. 5 years ago
  Eric Haszlakiewicz 5d89fc8a9d Add some backwards compat for Visual Studio 2013. 5 years ago
  Eric Haszlakiewicz 02b687b9a6 Kick json_type_array out of struct json_object; re-enable the test_deep_copy test. 5 years ago
  Eric Haszlakiewicz 853b4b5dee Start splitting struct json_object into multiple sub-types, as descibed at https://github.com/json-c/json-c/wiki/Proposal:-struct-json_object-split 5 years ago
  Tobias Stoeckmann 5385a566db Prevent truncation on custom double formatters. 5 years ago
  Eric Haszlakiewicz 0a3d22b9bb Revert part of PR#606 and use isnan/isinf again, but provide macro implementations of those in math_compat.h is needed, as it seems to be on AIX and IBM i systems. 5 years ago
  David McCann add7b13a9a Improved support for IBM operating systems 5 years ago
  Eric Haszlakiewicz ecb9354bb1 Re-do clang-format. 5 years ago
  Eric Haszlakiewicz 23ddcbd4da Make json_abort() internal to json_object.c 5 years ago
  Björn Esser d0dc3489dc
Enforce strict prototypes. 5 years ago
  Björn Esser 78cd37fb18
Clean trailing white-space. 5 years ago