Commit Graph

1087 Commits

Author SHA1 Message Date
c4429d580e Revert cJSON_AddItemReferenceToObjectCS to keep branch clean
This reverts commit 1208b35e03.
2022-05-24 22:23:46 +02:00
2ff0894010 Add cJSON_AddIntToObject() 2022-05-24 21:57:11 +02:00
bf7a73fa65 README.md: add compile details when using long long type 2022-05-24 21:42:03 +02:00
a5961c6613 Update README.md for integer vs floating point 2022-05-24 21:32:04 +02:00
4bafe51b12 Add cJSON_IsInt() 2022-05-24 20:36:24 +02:00
1208b35e03 Add cJSON_AddItemReferenceToObjectCS constant-string variant
This can not be implemented externally, since create_reference()
is not exposed.
2022-05-01 20:22:38 +02:00
4c2b3d8949 Fix float comparison also in cJSON_Utils 2022-05-01 13:33:21 +02:00
e79376f2d9 Make integers be first-class citizens, including full precision in longlong+float case 2022-04-29 23:11:06 +02:00
882361c428 Fix tests for all combinations of int/longlong and double/float 2022-04-28 22:05:41 +02:00
5cdc8d4c27 Floats choosable between double and float 2022-04-28 21:18:28 +02:00
a1efa1e77f long long fixes, enhancements, tests 2022-04-24 20:13:29 +02:00
586762189b Add tests for large integers representable in double 2022-04-24 18:31:45 +02:00
3506c17e57 Long long ints: optional compile choice 2022-04-24 16:47:29 +02:00
ec898e0143 Github pullreq 556: long long ints 2022-04-24 16:40:31 +02:00
b45f48e600 fix: add allocate check for replace_item_in_object (#675)
Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-03-29 15:02:59 +08:00
a6424b85dd feat: add cJSON_SetBoolValue and test (#639)
* cJSON_SetBoolValue plus test

* cJSON_Invalid insted of just 0

* Update tests/misc_tests.c

* VSCode standard C formater applied

Co-authored-by: Alan Wang <wp_scut@163.com>
2022-01-26 20:24:50 +08:00
3cecc40466 docs: Fix README typo (#664) 2022-01-26 20:23:33 +08:00
2fc55f6793 chore: add CIFuzz integration (#437)
* CIFuzz integration

* Rename main.yml to ci-fuzz.yml
2022-01-20 14:23:57 +08:00
c7025b093a chore: ignore all .dylib files (#628)
This fixes some .dylib files being flagged as added when compiled e.g. `libcjson.dylib.1.7.14`
2022-01-20 14:17:46 +08:00
e7ebe77ebf fix: 'cjson_utils-static' target not exist(#625)
* Update CMakeLists.txt

fix the bug:when build with cmake using option '-DBUILD_SHARED_AND_STATIC_LIBS=ON -DENABLE_CJSON_UTILS=ON', build sucess,
but use cmake comand 'find_package(cjson CONFIG)', 'cjson_utils' target is available,but  'cjson_utils-static' target not exist.
2022-01-19 16:28:29 +08:00
61eb84d991 add an option for ENABLE_CJSON_VERSION_SO in CMakeLists.txt (#534)
Co-authored-by: m00209177 <malihu@huawei.com>
2022-01-19 14:45:02 +08:00
d321fa9e6e fix: print int without decimal places (#630) 2022-01-19 10:30:31 +08:00
203a0dec6f chore: ignore *.lst/*.lss file (#623) 2021-10-22 16:21:55 +08:00
c77a688927 build: Bump cmake version and use new version syntax (#587)
Co-authored-by: Alan Wang <wp_scut@163.com>
2021-10-22 16:15:19 +08:00
e5dbaee131 docs: update comment (#622) 2021-10-22 16:09:45 +08:00
189dcde644 fix: add cmake_policy to CMakeLists.txt (#613)
Use the cmake_policy() command to set CMP0054 to NEW explicitly.
2021-10-22 16:02:06 +08:00
b9eff8b02a fix: for issue #569, now use the guard to turn it off (#617) 2021-10-22 15:57:05 +08:00
f50dafc7d0 fix: potential memory leak in merge_patch() (#611) 2021-08-26 14:13:42 +08:00
d348621ca9 chore: update version and changelog (#610) v1.7.15 2021-08-25 19:15:09 +08:00
744e47353a fix: remove redundant condition (#605) 2021-08-25 15:02:00 +08:00
7795249dd4 Typos found by codespell (#607) 2021-08-25 15:01:12 +08:00
324a6ac9a9 Update .gitattributes (#544) 2020-12-31 10:38:10 +08:00
6ea4c01e4e Fix potential core dumped for strrchr (#546) 2020-12-31 10:26:39 +08:00
9226e4ed8c Remove always true condition in cJSON.c (#539) 2020-12-17 17:07:18 +08:00
7b6645794d Fix null pointer crash, closes #536 (#538) 2020-12-17 15:42:31 +08:00
4100379a04 docs: fix simple typo, transfering -> transferring (#527)
There is a small typo in tests/readme_examples.c.

Should read `transferring` rather than `transfering`.
2020-11-16 08:57:02 +08:00
2f6fc7f0f2 fix several null pointer problems on allocation failure (#526) 2020-11-12 11:46:15 +08:00
a1e1c208ff Merge pull request #519 from Alanscut/issue-516
fix a possible dereference of null pointer
2020-10-16 17:12:54 +08:00
9bf4960cd5 fix a possible dereference of null pointer 2020-10-16 17:06:29 +08:00
488169faca Merge pull request #518 from fpnuseis/master
fix: windows build failure about defining nan
2020-10-16 16:52:10 +08:00
Use
9931900768 fix: windows build failure about defining nan 2020-10-15 11:52:06 +09:00
d2735278ed Merge pull request #505 from Alanscut/release-1.7.14
Release 1.7.14
v1.7.14
2020-09-03 17:14:26 +08:00
8e84db4c4e Update changelog and contributors 2020-09-03 17:11:02 +08:00
8e357f825b Update version to 1.7.14 2020-09-03 17:07:49 +08:00
2e5171d8d6 Merge pull request #503 from Alanscut/issue499
optimize the way to find tail node
2020-09-03 11:51:54 +08:00
c8ca78a3cc optimize the way to find tail node 2020-09-02 20:23:52 +08:00
0b13220419 Merge pull request #502 from Alanscut/nan
remove float-divide-by-zero for supporting NAN
2020-08-27 20:48:25 +08:00
23f027139e remove float-divide-by-zero for supporting NAN 2020-08-27 20:46:00 +08:00
60c3b0a571 Merge pull request #501 from Alanscut/actions
add github actions CI
2020-08-27 20:28:06 +08:00
857c037ccc add github actions CI 2020-08-27 20:26:04 +08:00