aboutsummaryrefslogtreecommitdiff
path: root/src/json.c
Commit message (Collapse)AuthorAge
...
* Convert json_insert(), json_replace(), json_set() to use JSONB internally.drh2023-11-30
| | | | | Mostly working, but some corner cases are still not quite right. FossilOrigin-Name: 99c8f6bd5c9a31b6d00f92e383bec8a8235ed553916ad59adbb1b7663f6ebff1
* Convert the json_error_position() routine to use only JSONB internally.drh2023-11-29
| | | FossilOrigin-Name: e7a8ba35bff6fde55827f978de5b343b6c134c7fa53827f5c63915a9dc2598ad
* The json_patch() function now operates exclusively on JSONB. This patchdrh2023-11-29
| | | | | also includes improvements to JSONB debug printing routines. FossilOrigin-Name: fee19d0098242110d2c44ec7b9620c1210ef3f87913305f66ec85d277dd96ab6
* Convert the json_array_length() function to use JSONB instead of JsonNodes.drh2023-11-29
| | | FossilOrigin-Name: 5ab790736d943e08f097efcee5cfbf0d83c65b0a53f273060330ba719affa5e5
* Do not set the J subtype when the output is JSONB.drh2023-11-28
| | | FossilOrigin-Name: 4f106b64fe8988435872806bd0a6c223b61f53af0dd1c47c847bb4eec4e03e27
* Preserve flexibility in the format of the RHS of -> and ->> operators founddrh2023-11-28
| | | | | in legacy. FossilOrigin-Name: 6231ec43adb7436195eb1497de39a6c13c6b4f1c5032e6ea52515d214e61fdbc
* Attempt to get json_extract() working with pure JSONB only, and withoutdrh2023-11-28
| | | | | | the use of JsonNode. Mostly working, but there are some differences from legacy in corner cases. FossilOrigin-Name: 8c324af1eca27e86adc45622af4f3b06a67a3f968596ac58aa7434b1f6f05f3c
* The json_remove() function now uses only JSONB, never JsonNodes, internally.drh2023-11-28
| | | FossilOrigin-Name: b69786e746ae2b927b64d9871fd120b7f8f06cc53739fd46a4da51aa16cf8576
* All legacy tests are passing.drh2023-11-28
| | | FossilOrigin-Name: 2c436806b8d5f57de99c00f6154b038454fb9ae427d00d7b4a46ab9c7c69bcb9
* The json_patch() code for JSONB compiles and works sometimes, but there aredrh2023-11-28
| | | | | still issues. Incremental check-in. FossilOrigin-Name: e0099464a0045a04f4ccf29bc2b8325fc8c7f39ccf4847e74818f928c9153588
* More aggressive use of jsonBlobEdit(). Improvements to the MergePatchdrh2023-11-28
| | | | | implementation sketch. FossilOrigin-Name: fbca9570fd2e1465739e4d3a8d9bb40fad594fd78ab49b2cb34efa27ebdd8361
* Add untested (#ifdefed-out) code for the MergePatch algorithm against JSONB.drh2023-11-27
| | | | | Add (and test) the jsonBlobEdit() routine that is needed by the new MergePatch. FossilOrigin-Name: 4d353387fc10e1038cfdd86e66007bf728c231a928e588897bbee0fbfe76f225
* Enhance the (SQLITE_DEBUG-only) json_parse() routine so that it shows a drh2023-11-27
| | | | | decoding of JSONB when given a BLOB argument. FossilOrigin-Name: af267868562e0799ad691dccad05f17afbc34d609eede8c55f57d209290246ef
* Give the json_valid() function an optional second argument that determinesdrh2023-11-27
| | | | | what is meant by "valid". FossilOrigin-Name: a4e19ad43dac81e7655ec03ff69bb99d1d02b0c227034c90fb41415fd4793fe3
* All tests passing.drh2023-11-27
| | | FossilOrigin-Name: b5a5660ca22437640c9bf32c44d92c76a7293dafcbaf4fa6a4c171128d64871d
* Fix corner-case error conditions.drh2023-11-26
| | | FossilOrigin-Name: ec23d34ab75e1d7e9366e59c633e0d30def8759f6d4717583ebeb4c90aeccf0d
* Same results as the legacy JsonNode implementation on a small set of test cases.drh2023-11-26
| | | FossilOrigin-Name: c3da4b079a1a15a4c0b1a6e71f876648b1d9eb32eddc67b9946c2475c7b6d085
* Remove unused elements from the json_tree() cursor.drh2023-11-25
| | | FossilOrigin-Name: 914a50117d477b2cd30d58388fb8d1b71ff7ff6842ba025f38efc6e9647d06d0
* Remove the vestigal JsonNode logic from json_tree() and json_each().drh2023-11-25
| | | FossilOrigin-Name: 66c2ab9ebbf90477742e6be0d30e061d827c409de038f2a5b73479ed9448c4a6
* Almost working. Path is still not exactly right when Root is defined ondrh2023-11-25
| | | | | json_tree(). FossilOrigin-Name: 92258246916a9c0d72785964513113848a850dec78bdade8b3f274e410df4e7e
* Generate the fullkey and path columns of json_tree().drh2023-11-25
| | | FossilOrigin-Name: ffaa468ab8871906121df9ee5ef3dc00129a0086ed9c18831ecda69bf7f71455
* Handle the path argument to json_tree() and json_each().drh2023-11-25
| | | FossilOrigin-Name: fded888469565b2a4687185a926bd23fccfbf167c8bebe6c10696fc7f972f41e
* Continuing work on json_tree() against a JSONB.drh2023-11-24
| | | FossilOrigin-Name: 3df891cb11feee65e239ee2506eda34a9688341f05210d7c2e25a05338cb71ad
* Incremental progress toward getting json_each() and json_tree() to workdrh2023-11-24
| | | | | directly off of a JSONB blob. FossilOrigin-Name: f8cab41b3bc65af6ff34b481db693d640ea025d09463d50b8e56d855e2abc913
* Fix jsonParseReset() to properly clear the JsonParse.aBlob element.drh2023-11-24
| | | FossilOrigin-Name: ab2644aacf4757a51cf62e05cff6711a0a3605d60502a3dd310887df1b993545
* Inserts invalid JSONB should return "malformed JSON", not a json path error.drh2023-11-21
| | | FossilOrigin-Name: 306ee66fbd0231a9f5b229e5630d5cc66c9cf08b466d2d9204e79e1f44a16374
* Direct editing of JSONB using json_insert() and json_set().drh2023-11-21
| | | FossilOrigin-Name: fffb7a9538838e26991e6f16ea3138346a30c33ea6c3d3834680ee6d1f6eece2
* Correct blob-to-text rendering in some corner cases.drh2023-11-21
| | | FossilOrigin-Name: 7822e0e59f9b611fe6289cc762b0aff61f9b87c3a82c60de110f447589a2c125
* Fix the translation of JSON5 numeric values from BLOB into text.drh2023-11-21
| | | FossilOrigin-Name: 40c4fb441f220982e4d61fd42597cf18546791a302fbcc8eec2eed29ee15ef35
* Make edits directly to the JSONB BLOB when the input to json_replace()drh2023-11-21
| | | | | is a JSONB. FossilOrigin-Name: d69c6acef54a81f46a97a05d443fe648635b4b70772069d6705ef829b718e985
* Both json_remove() jsonb_remove() work on pure JSONB as long as the inputdrh2023-11-15
| | | | | is JSONB. FossilOrigin-Name: 68d551730be0a3ea9579646ed4836c73554c83ca7f2303b69a18843f1750f1a7
* The jsonb_remove() routine now appears to be working.drh2023-11-15
| | | FossilOrigin-Name: e76d48137ea823b7810dc8c3b70eb21adabdd6cfbac36050c85d1375e94be1de
* Work toward getting jsonb_remove() to work directly on JSONB blobs.drh2023-11-15
| | | FossilOrigin-Name: a79ff8e58fcaf718a6fb78e145117f1d6d40d133f31e9752bb9c6d484850a27b
* Merge recent trunk enhancements and fixes into the jsonb branch.drh2023-11-10
|\ | | | | FossilOrigin-Name: 091a5f058dfe2115fb9213655b34f00bcec80aebb299b571975cfe4ecd5ec206
| * Add the SQLITE_RESULT_SUBTYPE flag for application-defined functions. Adddrh2023-11-09
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | the -DSQLITE_STRICT_SUBTYPE=1 compile-time option that raises an error if any function invokes sqlite3_result_subtype() without the SQLITE_RESULT_SUBTYPE flag. SQLITE_RESULT_SUBTYPE prevents an indexed value of that function from being used to replace an equivalent expression, since the indexed expression does not carry the subtype. Fix for the problem described at [forum:/forumpost/68d284c86b082c3e|forum post 68d284c86b082c3e]. FossilOrigin-Name: ba789a7804ab96d81b15d6ef6fed1f802fa69db47cf91d368933e55289fa1d6e
| | * Fixes: (1) In the ->> function, instead of setting a subtype and clearing it,drh2023-11-09
| | | | | | | | | | | | | | | | | | | | | do not set it in the first place, as doing the set would trigger an error under SQLITE_STRICT_SUBTYPE. (2) Allow the SQLITE_STRICT_SUBTYPE through the property filter on sqlite3_create_function(). FossilOrigin-Name: 6195468b14f6f17ea072cf191c9ef1bd0713acd314bc6dc128be7322bfd612cc
| | * Omit the new SQLITE_VALUE_SUBTYPE name. Stay with legacy SQLTIE_SUBTYPE.drh2023-11-09
| | | | | | | | | | | | | | | | | | | | | Add extra documentation to sqlite3_value_subtype() and sqlite3_result_subtype() indicating that the SQLITE_SUBTYPE and SQLITE_RESULT_SUBTYPE properties are required on functions that use those interfaces. FossilOrigin-Name: 563ad3be60d22c45f1c5b9a3e67738593f8b38f137147c56514166fbabf95365
| | * Make a distinction between functions that consume subtypes and functionsdrh2023-11-08
| | | | | | | | | | | | | | | that generate subtypes. FossilOrigin-Name: 48a92e3ad855227188a4c5afe4abbb7171761cf6fc930660084d9abeecfd91d9
| * | JSON5 bug fix: Escape double-quotes that occur inside of single-quoted strings.drh2023-11-09
| |/ | | | | | | | | [forum:/forumpost/ddcad3e884|Forum post ddcad3e884]. FossilOrigin-Name: 1c98d46d60ef1494bd8b7561c7d0cd5aafc178201a6f1f0da25dea6140b91cd0
* | Merge recent trunk enhancements into the jsonb branch, and especially thedrh2023-11-08
|\| | | | | | | | | finer-grain characterization of JSON function properties. FossilOrigin-Name: 72393b003f9f8675e4a124dddd09607b5b34ddefe56716b283c68c0982fb3d96
| * More precise characterization of JSON functions. Indicate when functions mightdrh2023-11-08
| | | | | | | | | | return JSON (subtype 'J') and when they make use of the function argument cache. FossilOrigin-Name: b2b62546c4a5e9dccb8aa0cb8eda228d662c69159e320b01a377317bc909e89f
* | Enhance the JSONB lookup routine with logic to apply edits. The new logic isdrh2023-11-03
| | | | | | | | | | currently unused and hence untested but does not create any regressions. FossilOrigin-Name: b12110276fc15d1b6b0cc455f89747ace7a09650d5ba433d8bb431bb4e5bc951
* | Merge recent trunk enhancements into the jsonb branch.drh2023-10-19
|\| | | | | FossilOrigin-Name: f47a8d0a207a8442a7f621b070ce9dd1d6013ce26bcf68165d20bb379bd478a0
| * Fix a harmless compiler warning about variant types for a pointer function.drh2023-10-17
| | | | | | FossilOrigin-Name: 37ff0d8e7f91c32e8c53bb015280be47c66bf599281b640a8d3fd41335b55289
| * Fix a JSON bug introduced by the optimization of [df099ad713011b67] anddrh2023-10-17
| | | | | | | | | | | | | | first appearing in 3.43.0. The problem occurs when doing a JSON_EXTRACT() on an array element that was added by JSON_SET() without first reparsing. Reported by [forum:/forumpost/fc0e3f1e2a|forum post fc0e3f1e2a]. FossilOrigin-Name: e5099c549a1d8959d4015516f090b8e6438e517a64b20651175bf5413d94fb58
| * Fix the use of an uninitialized value that occurs when doing a json_insert()drh2023-10-11
| | | | | | | | | | of a string value that contains embedded U+0000 characters. FossilOrigin-Name: d3c0cbb90966316be9cd25e3edb501da42731e8a83c13227b90ce17d3975a2c3
* | Fix the use of an uninitialized value that occurs when doing a json_insert()drh2023-10-11
| | | | | | | | | | of a string value that contains embedded U+0000 characters. FossilOrigin-Name: fc5ee9e51ad4556af526a6cefca5ae5a3b1b7affc4edf09832491d6b4f4ba366
* | Fix a missing zero-terminator on a string when processingdrh2023-10-11
| | | | | | | | | | JSON aggregates into JSONB. FossilOrigin-Name: fb81d570a3d9b8f55e9f278d5240605c5d0f3c5abde51550797999d03cf193a7
* | Fix an issue that can arise when processing corrupt JSONB.drh2023-10-11
| | | | | | FossilOrigin-Name: e50045c22296be84c6bea82bb8b310f07bca820c84d4a7349b16da0cf5d2657c
* | Improved robustness against corrupt JSONB.drh2023-10-11
| | | | | | FossilOrigin-Name: 0fbda92bb0eeb40f95c83f717e4e8f5bff1ac82f1c899e9f6d400d67df67214e