SQLite

All files named ”src/json.c”
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

History for src/json.c

2025-06-02
23:34
[cb87977b1e] part of check-in [5b3de6e8ab] Fix JSONB edit so that when it is trying to reduce the size of an element it understands 0xf0 (8-byte) sizes. (check-in: [5b3de6e8ab] user: drh branch: trunk, size: 173877)
2025-05-24
20:20
[d34969ecb9] part of check-in [28215d131c] Change json_group_object() so that it ignores entries where the label is NULL. [forum:/forumpost/e5bd251fb5|Forum post e5bd251fb5]. (check-in: [28215d131c] user: drh branch: trunk, size: 173835)
2025-05-10
17:09
[2406a6b0dd] part of check-in [491cf31904] Provide the SQLITE_BUG_COMPATIBLE_20250510 compile-time option that restores the JSON5 bug fixed in the previous check-in, in case some applications need it for legacy compatibility. (check-in: [491cf31904] user: drh branch: trunk, size: 173799)
15:53
[c63af6fa72] part of check-in [83c7477f2b] Add enforcement of the obscure JSON5 syntax rule that the \0 escape sequence must not be followed by a digit. [forum:/forumpost/c061e87faf7d1c55|Forum post c061e87faf]. (check-in: [83c7477f2b] user: drh branch: trunk, size: 173150)
2025-05-07
17:13
[44337d95da] part of check-in [cf8b55b3b6] Fix a harmless warning about and oversize shift operation on malformed JSONB inputs. OSSFuzz 415850463. (check-in: [cf8b55b3b6] user: drh branch: trunk, size: 173047)
2025-04-21
23:44
[c84b0f2bae] part of check-in [5ea56af2d2] Remove an extra conditional that was inserted earlier today and which is unreachable. (check-in: [5ea56af2d2] user: drh branch: trunk, size: 173042)
20:58
[bb0f8f2fa2] part of check-in [6538813cb8] Further improvements to the decision of whether or not a BLOB input is JSONB. (check-in: [6538813cb8] user: drh branch: trunk, size: 173055)
19:53
[d13d5e29d1] part of check-in [614d061b32] Do a better job of providing bug compatibility with SQLite 3.44.0. See [forum:/forumpost/07e206fcd6|forum thread 07e206fcd6] for background. (check-in: [614d061b32] user: drh branch: trunk, size: 173037)
2025-04-16
17:36
[d0e1c62a96] part of check-in [84e698f384] Attempt to provide EBCDIC translations to the tables in the JSON implementation. The SQLite developers do not have access to any computers using EBCDIC and so have no way to test this patch, and cannot vouch for its accuracy. (check-in: [84e698f384] user: drh branch: trunk, size: 173188)
2025-04-01
16:26
[fbae43c392] part of check-in [fb2f283038] Fix a typo accidently added to the prior check-in. (check-in: [fb2f283038] user: drh branch: json-opt, size: 170541)
15:17
[1de02e754e] part of check-in [b5de9584b7] This is an experimental optimization that attempts to keep a JSONB value the same size (same number of bytes) after doing a replace of an elements with a slightly smaller element, by denormalizing the size field. This can perhaps avoid unnecessary page updates and memmove() operations when making small changes in the middle of a large JSONB value. (check-in: [b5de9584b7] user: drh branch: json-opt, size: 170541)
2025-03-31
23:18
[3c3975ba06] part of check-in [dd251377bd] Fix a harmless typo in a code comment. (check-in: [dd251377bd] user: drh branch: trunk, size: 167489)
2025-02-27
21:17
[81e2012796] part of check-in [f50c21484d] Approximately 100 typo corrections spanning the whole tree, submitted via [forum:0db9827f0464bc33|forum post 0db9827f0464bc33] and individually audited and verified. Affects only code comments, innocuous test strings, error message text in tool (not library) code, and configure-level help text. (check-in: [f50c21484d] user: stephan branch: trunk, size: 167489)
2025-02-17
18:09
[5abb5cb782] part of check-in [e846743a87] Additional changes making it easier to prove that integer overflow does not occur. No problems found. (check-in: [e846743a87] user: drh branch: trunk, size: 167490)
2025-02-10
11:16
[2663a0c7e5] part of check-in [4aad891802] Convert some expensive NEVER() and ASSERT() macros into assert()s. (check-in: [4aad891802] user: drh branch: trunk, size: 167452)
00:20
[50d0032812] part of check-in [3b1dcac2ee] Small performance increase in jsonTranslateBlobToText(). (check-in: [3b1dcac2ee] user: drh branch: trunk, size: 167481)
2024-09-04
16:45
[e60c9f5132] part of check-in [c49c2a8c00] Fix a bug in the parsing of some corner-case JSON PATH strings that contain escaped double-quotes. (check-in: [c49c2a8c00] user: drh branch: branch-3.46, size: 167067)
16:01
[68a98c020c] part of check-in [60ac55c4b7] Fix a bug in the parsing of some corner-case JSON PATH strings that contain escaped double-quotes. (check-in: [60ac55c4b7] user: drh branch: trunk, size: 167337)
2024-05-27
13:41
[5b6a1d6015] part of check-in [eaf07fe69f] Doc typo fix. No code changes. (check-in: [eaf07fe69f] user: stephan branch: trunk, size: 167279)
13:24
[06cd3a8df2] part of check-in [82365a45b9] For compatibility with PostgreSQL, when right-hand side of the ->> operator is negative, it should index from the right side of the JSON array on the left-hand side. (check-in: [82365a45b9] user: drh branch: trunk, size: 167279)
2024-05-21
11:11
[bf1b51e321] part of check-in [de8182cf17] Fix the -> and ->> operators so that when the RHS is a string that looks like a number, it is still treated as a string, because that is what PG does. [forum:/forumpost/9e52cdfe15c3926e|Forum post 9e52cdfe15c3926e]. (check-in: [de8182cf17] user: drh branch: trunk, size: 167009)
2024-03-06
21:22
[29a42bc92c] part of check-in [5aa809bcfe] Fix harmless compiler warning seen with MSVC. (check-in: [5aa809bcfe] user: mistachkin branch: branch-3.45, size: 161853)
21:08
[a34bd6c9a9] part of check-in [c0f6152410] Fix harmless compiler warnings seen with MSVC. (check-in: [c0f6152410] user: mistachkin branch: branch-3.45, size: 161848)
14:30
[e2e40760d6] part of check-in [39552bd36c] Add the json_pretty(J) function for pretty-printing of JSON. An optional 2nd argument is text used for indentation, with a default value being four spaces. (check-in: [39552bd36c] user: drh branch: json-pretty, size: 167154)
2024-03-05
16:59
[df6d6d5a92] part of check-in [040946b342] The value returned by the json_each.json field needs to survive longer than the json_each virtual table itself, in the event that the value is used in an aggregate expression. dbsqlfuzz 5120bd0b3bb0b73eebbcb79ac37c6b0663fccad6 (check-in: [040946b342] user: drh branch: branch-3.45, size: 161848)
16:47
[9337dac9d9] part of check-in [952ed71b9b] The value returned by the json_each.json field needs to survive longer than the json_each virtual table itself, in the event that the value is used in an aggregate expression. dbsqlfuzz 5120bd0b3bb0b73eebbcb79ac37c6b0663fccad6 (check-in: [952ed71b9b] user: drh branch: trunk, size: 162827)
2024-02-22
18:15
[3b4e2778d9] part of check-in [e5db089931] Fix harmless compiler warning seen with MSVC. (check-in: [e5db089931] user: mistachkin branch: trunk, size: 162821)
2024-02-16
21:34
[682a7d3f38] part of check-in [b278ae3980] Fix the subtype on the value column from json_each/json_tree for cases when the value is an array or object. (check-in: [b278ae3980] user: drh branch: branch-3.45, size: 161842)
21:30
[a412d7f155] part of check-in [1c33c5db2e] Fix the subtype on the value column from json_each/json_tree for cases when the value is an array or object. Fix for the bug reported by [forum:/forumpost/ecb94cd210|forum post ecb94cd210]. (check-in: [1c33c5db2e] user: drh branch: trunk, size: 162816)
2024-02-11
23:25
[2f960df187] part of check-in [c080560c2d] Cherrypick multiple fixes for trifling faults from trunk, so that all 834 dbsqlfuzz run clean with ASAN on branch-3.45. dbsqlfuzz. (check-in: [c080560c2d] user: drh branch: branch-3.45, size: 161729)
2024-02-07
14:16
[03dc4e64cc] part of check-in [77431aca6e] Detect and respond to an OOM on the jsonStringTerminate() call of jsonReturnStringAsBlob() routine. (check-in: [77431aca6e] user: drh branch: branch-3.45, size: 161706)
14:05
[a0346bef35] part of check-in [881f814c09] Detect and respond to an OOM on the jsonStringTerminate() call of jsonReturnStringAsBlob() routine. (check-in: [881f814c09] user: drh branch: trunk, size: 162703)
2024-02-06
18:33
[0c98979fac] part of check-in [6a2b3266c5] Slight change to OOM handling in JSON to catch a corner case found by dbsqlfuzz. (check-in: [6a2b3266c5] user: drh branch: trunk, size: 162591)
2024-02-04
04:01
[ae8847ccf8] part of check-in [e52c87420b] Fix harmless compiler warnings seen with MSVC. (check-in: [e52c87420b] user: mistachkin branch: trunk, size: 162568)
2024-01-31
15:20
[e4e5f70b60] part of check-in [e3c0c0e686] Add NEVER() and ALWAYS() macros for the JSON5-control-character change. Also fix an incorrect comparison used to determine if a buffer needed to be resized. (check-in: [e3c0c0e686] user: drh branch: json5-ctrl-char, size: 162568)
14:44
[24f2517b5d] part of check-in [5d72564462] Fix failure to detect unterminated string literals in json_valid() in the previous check-in. (check-in: [5d72564462] user: drh branch: json5-ctrl-char, size: 162553)
13:46
[366c450216] part of check-in [34709c7cc9] Allow control characters in JSON5 string literals. (check-in: [34709c7cc9] user: drh branch: json5-ctrl-char, size: 162474)
12:15
[192c5e5013] part of check-in [32ce7dacf5] Fix a memory allocation bug in the (debug-use-only) json_parse() SQL function. (check-in: [32ce7dacf5] user: drh branch: trunk, size: 161662)
2024-01-29
21:29
[31eb3e1386] part of check-in [ab40e28246] Detect malformed nested JSONB earlier and stop rendering to avoid long delays. (check-in: [ab40e28246] user: drh branch: branch-3.45, size: 161594)
21:09
[4f824b70a6] part of check-in [72f3e1d0ec] Detect malformed nested JSONB earlier and stop rendering to avoid long delays. (check-in: [72f3e1d0ec] user: drh branch: trunk, size: 161637)
20:36
[25472b53ce] part of check-in [97666ec052] When generated text JSON from JSONB, do not continue descending into nested structures after an error is seen. This avoids long loops and wait times. (check-in: [97666ec052] user: drh branch: trunk, size: 161570)
16:49
[2bc8eeedb7] part of check-in [ac402cc551] Avoid a potential buffer overread when handling corrupt json blobs. (check-in: [ac402cc551] user: drh branch: branch-3.45, size: 161493)
15:30
[1658ff90bc] part of check-in [738473dc0a] Avoid a potential buffer overread when handling corrupt json blobs. (check-in: [738473dc0a] user: dan branch: trunk, size: 161536)
12:58
[a66722d3de] part of check-in [3ab08ac75d] When rendering JSONB back into text JSON, report an error if a zero-length integer or floating-point node is encountered. Otherwise, if the node occurs at the very end of the JSONB, the rendering logic might read one byte past the end of the initialized part of the BLOB byte array. OSSFuzz 66284. (check-in: [3ab08ac75d] user: drh branch: branch-3.45, size: 161483)
12:50
[bf20b47d11] part of check-in [b0eb279ea8] When rendering JSONB back into text JSON, report an error if a zero-length integer or floating-point node is encountered. Otherwise, if the node occurs at the very end of the JSONB, the rendering logic might read one byte past the end of the initialized part of the BLOB byte array. OSSFuzz 66284. (check-in: [b0eb279ea8] user: drh branch: trunk, size: 161526)
2024-01-23
13:53
[19d96d7cae] part of check-in [4c2c1b97dc] When a JSON input is a blob, but it looks like valid JSON when cast to text, then accept it as valid JSON. This replicates a long-standing bug in the behavior of JSON routines, and thus avoids breaking legacy apps. (check-in: [4c2c1b97dc] user: drh branch: branch-3.45, size: 161340)
13:28
[b2189995bb] part of check-in [1f09541eb4] Fix typo in the tag-20240123-a in a comment. (check-in: [1f09541eb4] user: drh branch: blob-as-json, size: 161383)
13:21
[14563eed12] part of check-in [d79a37690c] If a BLOB looks like JSON when cast to text, then treat it as if it really were JSON. This replicates a long-standing bug in the JSON processing routines, and thereby avoids breaking legacy. (check-in: [d79a37690c] user: drh branch: blob-as-json, size: 161383)
2024-01-22
14:16
[99f2825b44] part of check-in [6557222358] The -DSQLITE_JSON_BLOB_INPUT_BUG_COMPATIBLE compile-time option causes blob inputs to JSON functions that are not JSONB to be processed as if they where text, immulating historical bugging behavior which some applications have come to rely upon. See [forum:/forumpost/012136abd5292b8d|forum thread 012136abd5292b8d] for discussion. (check-in: [6557222358] user: drh branch: blob-as-json, size: 161371)
2024-01-20
12:19
[fdb6b417e9] part of check-in [950bf9fe78] When backing out a character in a constructed string in JSON, first make sure the string has not been reset by on OOM. (check-in: [950bf9fe78] user: drh branch: branch-3.45, size: 160149)
12:13
[5405e50cf0] part of check-in [666690eb43] When backing out a character in a constructed string in JSON, first make sure the string has not been reset by on OOM. dbsqlfuzz 2fffbea91a5376526ea118d4fe4188c8dd35e317. (check-in: [666690eb43] user: drh branch: trunk, size: 160192)
2024-01-16
15:04
[624824b0c4] part of check-in [05d2cf5e90] Clutter the code with "fall-through" comments in order to suppress nuisance compiler warnings. No logic changes. (check-in: [05d2cf5e90] user: drh branch: trunk, size: 159915)
2024-01-03
16:41
[4913fd22c4] part of check-in [a79a244954] Convert the JSON functions to use lookaside memory allocation whenever feasible, to avoid hitting the global memory allocator mutex. (check-in: [a79a244954] user: drh branch: trunk, size: 159872)
2023-12-28
19:18
[a84de35816] part of check-in [190ab3c084] Performance improvement by unwinding a loop in jsonAppendString(). (check-in: [190ab3c084] user: drh branch: trunk, size: 159345)
16:21
[4e389cbf10] part of check-in [056de8d551] Enhance the (undocumented, debug-only) json_parse() SQL function so that it returns the text rendering of the JSONB parse of the input, rather than printing the rendering on stdout. (check-in: [056de8d551] user: drh branch: trunk, size: 158953)
2023-12-26
13:20
[bc90605da9] part of check-in [e252bdf5f5] Improved handling of malformed unicode within JSON strings. (check-in: [e252bdf5f5] user: drh branch: trunk, size: 157953)
2023-12-21
18:08
[498cbe3346] part of check-in [4d30478863] Add internal core-developer-only documentation of the JSONB format. (check-in: [4d30478863] user: drh branch: trunk, size: 157576)
2023-12-19
21:39
[c6fae579d6] part of check-in [215fabda38] In JSON - minor code cleanup and refactoring with a small size reduction and performance increase. (check-in: [215fabda38] user: drh branch: trunk, size: 157469)
00:07
[661b6da631] part of check-in [6618bdf067] Remove a stray comment in the JSON code. (check-in: [6618bdf067] user: drh branch: trunk, size: 157469)
2023-12-18
18:50
[7200bf814e] part of check-in [9a0c67db36] Add NEVER() to an unfalsifiable branch. (check-in: [9a0c67db36] user: drh branch: trunk, size: 157543)
18:31
[f405fac347] part of check-in [178cb84f36] Fix JSON to JSONB translation so that it deals correctly with Infinity and NaN. (check-in: [178cb84f36] user: drh branch: trunk, size: 157536)
15:53
[953ac749c4] part of check-in [4b4581668a] Ensure that the insert/delete size delta on JSONB objects in the JSON cache are always set to zero. (check-in: [4b4581668a] user: drh branch: trunk, size: 157008)
2023-12-14
15:38
[55aaffca9b] part of check-in [90135efccf] Fix harmless compiler warnings in JSON and FTS5. (check-in: [90135efccf] user: drh branch: trunk, size: 156927)
2023-12-13
15:27
[64e5ed9b56] part of check-in [3e940a6a08] Bug fix in the JSONB validator. dbsqlfuzz ac6fa521a08609a642198e7decf64180e750b3c4 (check-in: [3e940a6a08] user: drh branch: trunk, size: 156912)
14:31
[f5b41d1515] part of check-in [1b229c1101] Improvements to UTF8 handling, and especially the handling of invalid UTF8, in the JSON routines. (check-in: [1b229c1101] user: drh branch: trunk, size: 156929)
2023-12-12
18:38
[59f357a5f8] part of check-in [4d5353cadd] Fix the JSON object label comparison object so that it works correctly even if the label ends with escaped whitespace. (check-in: [4d5353cadd] user: drh branch: trunk, size: 156338)
17:13
[cd270629b4] part of check-in [c96ebb086f] Add NEVER to two unreachable branches in JSON. (check-in: [c96ebb086f] user: drh branch: jsonb-valid, size: 156252)
14:33
[6fc223a6cf] part of check-in [be1864eac4] Improvements to JSONB validation - catch more cases where the input does not conform to spec. (check-in: [be1864eac4] user: drh branch: jsonb-valid, size: 156180)
02:31
[34f829db19] part of check-in [fa5160687c] Validity checking of text nodes in JSONB. (check-in: [fa5160687c] user: drh branch: jsonb-valid, size: 156107)
2023-12-11
21:00
[387dd9d7d6] part of check-in [80d5d94dff] The json_error_position() function now reports an approximate byte offset to the problem in a JSONB if there is a problem. (check-in: [80d5d94dff] user: drh branch: jsonb-valid, size: 154962)
20:44
[191626c46a] part of check-in [c3d60cf702] json_error_position() now uses jsonValidityCheck() to find the approximate position of an error in a JSONB blob. (check-in: [c3d60cf702] user: drh branch: jsonb-valid, size: 154706)
20:19
[d0c018e1d9] part of check-in [c0d7f4520d] json_valid(*,8) allows minus-signs on hexadecimal literals. (check-in: [c0d7f4520d] user: drh branch: jsonb-valid, size: 154812)
19:00
[484486f07a] part of check-in [7aff1d9a4c] Rename the new test-control to SQLITE_TESTCTRL_JSON_SELFCHECK. Make it so that the current value of the setting can be interrogated. (check-in: [7aff1d9a4c] user: drh branch: jsonb-valid, size: 154737)
17:03
[ea4b13e85f] part of check-in [b410a4db74] Add SQLITE_TESTCTRL_VALIDATE_JSONB, which if enabled under SQLITE_DEBUG causes cross-checking of generate JSONB. (check-in: [b410a4db74] user: drh branch: jsonb-valid, size: 154737)
14:01
[683a85f8b3] part of check-in [c370d57319] Work toward enhanced functionality for json_valid() with deep checking of the JSONB (second argument has bit 0x08). (check-in: [c370d57319] user: drh branch: jsonb-valid, size: 153563)
02:39
[0225487364] part of check-in [fa102036fe] Fix a potential use of uninitialized value in json_valid() with 2nd argument of 8. (check-in: [fa102036fe] user: drh branch: trunk, size: 151399)
2023-12-08
16:56
[5631fd482c] part of check-in [1503cba6d1] Fix a harmless UBSAN warning. (check-in: [1503cba6d1] user: drh branch: trunk, size: 151361)
14:54
[0b92947cc3] part of check-in [d2f2174ce2] Fix a potential problem RCStr access on a JsonString object that is not really and RCStr. Fuzzer/UBSAN find. (check-in: [d2f2174ce2] user: drh branch: trunk, size: 151356)
2023-12-07
14:09
[3d64e42894] part of check-in [858b76a00e] Rework the jsonEachPathLength() routine in json_tree() so that it is less susceptible to problems due to goofy object labels. (check-in: [858b76a00e] user: drh branch: trunk, size: 151314)
12:55
[674cabf943] part of check-in [b014736c1f] Improved detection of corrupt JSONB in the jsonReturnFromBlob() function. (check-in: [b014736c1f] user: drh branch: trunk, size: 151245)
2023-12-06
17:50
[c2e0fea06f] part of check-in [bda2e30cc2] Do correct comparisons between object labels in JSON even when the two labels contain different JSON escapes. (check-in: [bda2e30cc2] user: drh branch: trunk, size: 150691)
17:39
[07247c969e] part of check-in [73d390f39c] Correctly handle 8-byte sizes in the JSONB format. [forum:/forumpost/283daf08e91183fc|Forum post 283daf08e91183fc]. (check-in: [73d390f39c] user: drh branch: trunk, size: 146989)
16:57
[89ce1dbcd8] part of check-in [b9243ee8a3] Fix the routine that determines the json_tree.path value for the first row so that it correctly takes into account escape sequences in the path argument. (check-in: [b9243ee8a3] user: drh branch: json-label-compare, size: 150349)
15:35
[9d0b8fa594] part of check-in [0e059a546e] The rule for the RHS of the ->> and -> operators when the RHS does not begin with $ is that it must be (1) all digits, or (2) all alphanumerics, or (3) contained within [..] or else it will become a quoted label. (check-in: [0e059a546e] user: drh branch: json-label-compare, size: 150391)
14:50
[15efd213cc] part of check-in [2bc86d145f] Increased rigor in comparisons between object labels in JSON. (check-in: [2bc86d145f] user: drh branch: json-label-compare, size: 149821)
2023-12-05
19:24
[0a6095d10a] part of check-in [174c2b2eef] Use extra assert() statement to silence harmless static analyzer warnings. (check-in: [174c2b2eef] user: drh branch: jsonb, size: 146647)
18:28
[00480474f1] part of check-in [59446dc0bd] Miscellaneous comment cleanup and typo fixes. (check-in: [59446dc0bd] user: drh branch: jsonb, size: 146491)
12:52
[752aabf2c9] part of check-in [843197df08] Use strspn() to accelerate whitespace bypass in the JSON parser. (check-in: [843197df08] user: drh branch: jsonb, size: 146375)
12:22
[53d9e4ea2e] part of check-in [4c587feac1] Small performance gain by unwinding the string literal delimiter search loop in the JSON parser by one more level. (check-in: [4c587feac1] user: drh branch: jsonb, size: 146178)
01:44
[3635645a2a] part of check-in [a249ca657e] Use an assert() to fix a harmless static analyzer warning. (check-in: [a249ca657e] user: drh branch: jsonb, size: 146116)
00:17
[4dadaf5844] part of check-in [1910feb0b7] Fix OOM and corrupt JSONB handling in json_patch(). (check-in: [1910feb0b7] user: drh branch: jsonb, size: 146056)
2023-12-04
23:12
[d2385c49df] part of check-in [ebf667b616] Rename the internal routine jsonMergePatchBlob() to just jsonMergePatch(). (check-in: [ebf667b616] user: drh branch: jsonb, size: 146006)
19:32
[326c714920] part of check-in [aa85df2d26] Fixes to error handling in json_array_length(). (check-in: [aa85df2d26] user: drh branch: jsonb, size: 146026)
19:14
[ab1eb1ab2e] part of check-in [66594544f3] Do not make the input JSONB editable in json_remove() if there are no PATH argument. (check-in: [66594544f3] user: drh branch: jsonb, size: 146110)
18:53
[b3a194fc1d] part of check-in [f1a51ae386] Fix errors in rendering JSON5 escape sequences embedded in JSONB. (check-in: [f1a51ae386] user: drh branch: jsonb, size: 146120)
17:40
[0e9fc8f2f2] part of check-in [ddf92b5059] Continuing simplifications and code cleanup. (check-in: [ddf92b5059] user: drh branch: jsonb, size: 146019)
16:01
[486643d34e] part of check-in [f601de3eea] Remove reachable ALWAYS and NEVER macros. (check-in: [f601de3eea] user: drh branch: jsonb, size: 146385)
15:22
[f9628f4dc6] part of check-in [52632c92cb] Two new NEVER macros. (check-in: [52632c92cb] user: drh branch: jsonb, size: 146400)
13:12
[fdab711d10] part of check-in [ae973cb151] Repair issues and inefficiencies found during testing. (check-in: [ae973cb151] user: drh branch: jsonb, size: 146386)
01:14
[fe5c8d7494] part of check-in [526b27f908] Better pre-scan size estimations for objects in the JSON parser resulting in fewer reallocations and memmove operations. (check-in: [526b27f908] user: drh branch: jsonb, size: 147794)
00:31
[4cf9581f5d] part of check-in [79fb54fbb8] Back off on the use of strlen() for situations where sqlite3_value_bytes() will work as well, for performance. (check-in: [79fb54fbb8] user: drh branch: jsonb, size: 147798)
2023-12-03
23:38
[2f824bf3cb] part of check-in [2eaa738e6b] Remove dead code. Improved reporting of errors in JSON inputs. (check-in: [2eaa738e6b] user: drh branch: jsonb, size: 147807)
23:30
[6ac93a6cc3] part of check-in [9f055091af] Avoid problems when the path argument to json_tree() contains embedded U+0000 characters. (check-in: [9f055091af] user: drh branch: jsonb, size: 147798)
20:11
[6d92343776] part of check-in [aa0e02b5c2] Ensure that OOM conditions in the generation of the "bad JSON path" error message result in an SQLITE_NOMEM error. (check-in: [aa0e02b5c2] user: drh branch: jsonb, size: 149147)
19:59
[a575d568a6] part of check-in [4d6a9a217d] Enable incorrect JSONB to be rendered into text without hitting an assertion for a bad whitespace escape in a string. (check-in: [4d6a9a217d] user: drh branch: jsonb, size: 149079)
11:54
[0bbd116e90] part of check-in [8dec1ba1e5] Do not let bad hexadecimal digits in malformed JSONB cause an assertion fault. (check-in: [8dec1ba1e5] user: drh branch: jsonb, size: 149073)
00:51
[9a79d32ad7] part of check-in [df272bd837] Minor code changes for consistency and to simplify testing. (check-in: [df272bd837] user: drh branch: jsonb, size: 148690)
2023-12-02
21:39
[fd321d1ab2] part of check-in [0f26d38880] Implement strict JSONB checking in the json_valid() function. (check-in: [0f26d38880] user: drh branch: jsonb, size: 149172)
20:37
[fc67289aeb] part of check-in [419652c0c8] Fix harmless compiler warnings reported by MSVC. (check-in: [419652c0c8] user: drh branch: jsonb, size: 148120)
20:25
[5ad1a1be61] part of check-in [c640754df0] Code and comment cleanup. Everything should work the same. (check-in: [c640754df0] user: drh branch: jsonb, size: 148120)
18:17
[b67328611c] part of check-in [7e39415027] Fix harmless compiler warnings. Refactor some identifier names for clearer presentation. (check-in: [7e39415027] user: drh branch: jsonb, size: 146031)
18:04
[4c6b5c0c73] part of check-in [1304534001] Take extra care to ensure that JSONB values that are in cache are actually owned by the JSON subsystem, and that ownership of such values is not handed back to the bytecode engine. (check-in: [1304534001] user: drh branch: jsonb, size: 145801)
16:11
[21ffece5a6] part of check-in [26144d1c25] Protect a memcpy() against OOM conditions. (check-in: [26144d1c25] user: drh branch: jsonb, size: 145535)
15:59
[837599bccc] part of check-in [c6bacf57bd] Do not allow a JsonParse object to be considered "editable" after an OOM. (check-in: [c6bacf57bd] user: drh branch: jsonb, size: 145485)
15:06
[c3167c9737] part of check-in [d2fba2cbdc] Fix potential unsigned integer underflow in jsonAppendString(). (check-in: [d2fba2cbdc] user: drh branch: jsonb, size: 145455)
14:55
[9ff2d40ed0] part of check-in [c3677ba410] Minor fix to the header comment on jsonXlateTextToBlob(). (check-in: [c3677ba410] user: drh branch: jsonb, size: 145455)
14:16
[a3eabd185c] part of check-in [fdf00e9623] Performance optimization in jsonAppendString(). (check-in: [fdf00e9623] user: drh branch: jsonb, size: 145448)
13:36
[73558b9dca] part of check-in [f5ec948511] Simplification and optimization of the JSON parser. (check-in: [f5ec948511] user: drh branch: jsonb, size: 145133)
01:38
[5363d3a9e6] part of check-in [a6dc29e4d5] Unroll a loop in the parser for a performance increase. (check-in: [a6dc29e4d5] user: drh branch: jsonb, size: 145069)
01:06
[58c3ded3bd] part of check-in [285633da6d] Fix harmless compiler warnings and enhance performance the parser. (check-in: [285633da6d] user: drh branch: jsonb, size: 144930)
2023-12-01
22:01
[d524f2f133] part of check-in [68d191f40e] Performance optimization in the JSON parser. (check-in: [68d191f40e] user: drh branch: jsonb, size: 144547)
18:46
[3556e87938] part of check-in [1fdbc39521] Fix up the JSON cache to work better. (check-in: [1fdbc39521] user: drh branch: jsonb-cache, size: 144655)
13:28
[32e3741e5f] part of check-in [a12add7ab9] Cache is working better, but does not preserve the hasJson5 flag. (check-in: [a12add7ab9] user: drh branch: jsonb-cache, size: 145037)
12:57
[9a96faf916] part of check-in [25ed295f30] First attempt to get the JSON text-to-binary cache working. All test cases pass, but the cache seems not to help much. (check-in: [25ed295f30] user: drh branch: jsonb, size: 144483)
2023-11-30
23:36
[c4f3602115] part of check-in [11ebb5f712] Remove all trace of JsonNode from the JSON implementation. The JSONB format is used as the internal binary encoding for searching and editing. (check-in: [11ebb5f712] user: drh branch: jsonb, size: 139951)
20:57
[04044605d6] part of check-in [7b5756fa6d] Convert json_valid() over to using only JSONB as its internal format. (check-in: [7b5756fa6d] user: drh branch: jsonb, size: 153146)
19:29
[3d897ec27a] part of check-in [83074835b9] Convert json_type() to use JSONB internally. (check-in: [83074835b9] user: drh branch: jsonb, size: 172703)
19:06
[92cc05dcf8] part of check-in [cc7a641ab5] Enhance json_set() and json_insert() so that they create missing substructure. (check-in: [cc7a641ab5] user: drh branch: jsonb-insert, size: 172996)
00:52
[8b509dead9] part of check-in [99c8f6bd5c] Convert json_insert(), json_replace(), json_set() to use JSONB internally. Mostly working, but some corner cases are still not quite right. (check-in: [99c8f6bd5c] user: drh branch: jsonb-insert, size: 171603)
2023-11-29
20:06
[d93f5e7d0e] part of check-in [e7a8ba35bf] Convert the json_error_position() routine to use only JSONB internally. (check-in: [e7a8ba35bf] user: drh branch: jsonb, size: 190247)
17:36
[00b55c9e54] part of check-in [fee19d0098] The json_patch() function now operates exclusively on JSONB. This patch also includes improvements to JSONB debug printing routines. (check-in: [fee19d0098] user: drh branch: jsonb, size: 189728)
01:38
[aebeb6c1be] part of check-in [5ab790736d] Convert the json_array_length() function to use JSONB instead of JsonNodes. (check-in: [5ab790736d] user: drh branch: jsonb, size: 193470)
2023-11-28
23:18
[dd5c3f5287] part of check-in [4f106b64fe] Do not set the J subtype when the output is JSONB. (check-in: [4f106b64fe] user: drh branch: jsonb-extract, size: 193158)
20:33
[4dfa914bc5] part of check-in [6231ec43ad] Preserve flexibility in the format of the RHS of -> and ->> operators found in legacy. (check-in: [6231ec43ad] user: drh branch: jsonb-extract, size: 194940)
20:25
[bbe9cb3417] part of check-in [8c324af1ec] Attempt to get json_extract() working with pure JSONB only, and without the use of JsonNode. Mostly working, but there are some differences from legacy in corner cases. (check-in: [8c324af1ec] user: drh branch: jsonb-extract, size: 194865)
18:16
[442ff1ce9e] part of check-in [b69786e746] The json_remove() function now uses only JSONB, never JsonNodes, internally. (check-in: [b69786e746] user: drh branch: jsonb, size: 199534)
13:35
[fa3a1b6f24] part of check-in [2c436806b8] All legacy tests are passing. (check-in: [2c436806b8] user: drh branch: jsonb-patch, size: 199838)
12:28
[2dfbca7572] part of check-in [e0099464a0] The json_patch() code for JSONB compiles and works sometimes, but there are still issues. Incremental check-in. (check-in: [e0099464a0] user: drh branch: jsonb-patch, size: 199476)
00:27
[a91647a3c5] part of check-in [fbca9570fd] More aggressive use of jsonBlobEdit(). Improvements to the MergePatch implementation sketch. (check-in: [fbca9570fd] user: drh branch: jsonb, size: 197561)
2023-11-27
23:46
[7d63879207] part of check-in [4d353387fc] Add untested (#ifdefed-out) code for the MergePatch algorithm against JSONB. Add (and test) the jsonBlobEdit() routine that is needed by the new MergePatch. (check-in: [4d353387fc] user: drh branch: jsonb, size: 197293)
17:13
[aefd3bf7c2] part of check-in [af26786856] Enhance the (SQLITE_DEBUG-only) json_parse() routine so that it shows a decoding of JSONB when given a BLOB argument. (check-in: [af26786856] user: drh branch: jsonb, size: 189760)
15:57
[6c1de0d780] part of check-in [a4e19ad43d] Give the json_valid() function an optional second argument that determines what is meant by "valid". (check-in: [a4e19ad43d] user: drh branch: jsonb, size: 187144)
12:30
[efd9ec1cb0] part of check-in [b5a5660ca2] All tests passing. (check-in: [b5a5660ca2] user: drh branch: jsonb-tree, size: 184185)
2023-11-26
00:56
[59dd8bf951] part of check-in [ec23d34ab7] Fix corner-case error conditions. (check-in: [ec23d34ab7] user: drh branch: jsonb-tree, size: 183589)
00:48
[b93f282f03] part of check-in [c3da4b079a] Same results as the legacy JsonNode implementation on a small set of test cases. (check-in: [c3da4b079a] user: drh branch: jsonb-tree, size: 183638)
2023-11-25
23:00
[7bd0d3809b] part of check-in [914a50117d] Remove unused elements from the json_tree() cursor. (check-in: [914a50117d] user: drh branch: jsonb-tree, size: 182484)
20:59
[211c4e1b8f] part of check-in [66c2ab9ebb] Remove the vestigal JsonNode logic from json_tree() and json_each(). (check-in: [66c2ab9ebb] user: drh branch: jsonb-tree, size: 182672)
19:28
[617eaedbe4] part of check-in [9225824691] Almost working. Path is still not exactly right when Root is defined on json_tree(). (check-in: [9225824691] user: drh branch: jsonb-tree, size: 191809)
18:11
[9a5ff28f7b] part of check-in [ffaa468ab8] Generate the fullkey and path columns of json_tree(). (check-in: [ffaa468ab8] user: drh branch: jsonb-tree, size: 191511)
13:40
[ff48d52463] part of check-in [fded888469] Handle the path argument to json_tree() and json_each(). (check-in: [fded888469] user: drh branch: jsonb-tree, size: 191326)
2023-11-24
21:57
[699b3fa340] part of check-in [3df891cb11] Continuing work on json_tree() against a JSONB. (check-in: [3df891cb11] user: drh branch: jsonb-tree, size: 190063)
18:44
[1b9cc57728] part of check-in [f8cab41b3b] Incremental progress toward getting json_each() and json_tree() to work directly off of a JSONB blob. (check-in: [f8cab41b3b] user: drh branch: jsonb-tree, size: 189439)
14:25
[c6b23115b4] part of check-in [ab2644aacf] Fix jsonParseReset() to properly clear the JsonParse.aBlob element. (check-in: [ab2644aacf] user: drh branch: jsonb, size: 183146)
2023-11-21
22:36
[f8cfdf1d02] part of check-in [306ee66fbd] Inserts invalid JSONB should return "malformed JSON", not a json path error. (check-in: [306ee66fbd] user: drh branch: jsonb, size: 183197)
20:13
[6530a0ad96] part of check-in [fffb7a9538] Direct editing of JSONB using json_insert() and json_set(). (check-in: [fffb7a9538] user: drh branch: jsonb, size: 183096)
19:05
[54e4261d68] part of check-in [7822e0e59f] Correct blob-to-text rendering in some corner cases. (check-in: [7822e0e59f] user: drh branch: jsonb, size: 181879)
18:23
[c5d4b35c59] part of check-in [40c4fb441f] Fix the translation of JSON5 numeric values from BLOB into text. (check-in: [40c4fb441f] user: drh branch: jsonb, size: 181725)
17:51
[9be29c023c] part of check-in [d69c6acef5] Make edits directly to the JSONB BLOB when the input to json_replace() is a JSONB. (check-in: [d69c6acef5] user: drh branch: jsonb, size: 181681)
2023-11-15
20:32
[949c4a3624] part of check-in [68d551730b] Both json_remove() jsonb_remove() work on pure JSONB as long as the input is JSONB. (check-in: [68d551730b] user: drh branch: jsonb, size: 177043)
18:47
[a647820e1e] part of check-in [e76d48137e] The jsonb_remove() routine now appears to be working. (check-in: [e76d48137e] user: drh branch: jsonb-remove, size: 176842)
16:10
[3ff1ea643c] part of check-in [a79ff8e58f] Work toward getting jsonb_remove() to work directly on JSONB blobs. (check-in: [a79ff8e58f] user: drh branch: jsonb-remove, size: 176280)
2023-11-10
18:59
[01644dc0c3] part of check-in [091a5f058d] Merge recent trunk enhancements and fixes into the jsonb branch. (check-in: [091a5f058d] user: drh branch: jsonb, size: 174782)
2023-11-09
17:42
[b2045aafc5] part of check-in [65a9cfc466] Add the SQLITE_RESULT_SUBTYPE flag for application-defined functions. Add 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. (check-in: [65a9cfc466] user: drh branch: branch-3.44, size: 113012)
17:36
[f93bf3df36] part of check-in [ba789a7804] Add the SQLITE_RESULT_SUBTYPE flag for application-defined functions. Add 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]. (check-in: [ba789a7804] user: drh branch: trunk, size: 113009)
15:01
[afbda75330] part of check-in [6195468b14] Fixes: (1) In the ->> function, instead of setting a subtype and clearing it, 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(). (check-in: [6195468b14] user: drh branch: func-rw-subtype, size: 112888)
12:08
[bf117324d2] part of check-in [563ad3be60] Omit the new SQLITE_VALUE_SUBTYPE name. Stay with legacy SQLTIE_SUBTYPE. 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. (check-in: [563ad3be60] user: drh branch: func-rw-subtype, size: 112719)
01:56
[955a46d0ac] part of check-in [6cc57bb2ce] JSON5 bug fix: Escape double-quotes that occur inside of single-quoted strings. (check-in: [6cc57bb2ce] user: drh branch: branch-3.44, size: 111902)
01:54
[78559ef0eb] part of check-in [1c98d46d60] JSON5 bug fix: Escape double-quotes that occur inside of single-quoted strings. [forum:/forumpost/ddcad3e884|Forum post ddcad3e884]. (check-in: [1c98d46d60] user: drh branch: trunk, size: 112397)
2023-11-08
21:38
[7fe43f3148] part of check-in [48a92e3ad8] Make a distinction between functions that consume subtypes and functions that generate subtypes. (check-in: [48a92e3ad8] user: drh branch: func-rw-subtype, size: 112731)
17:11
[e745701b98] part of check-in [72393b003f] Merge recent trunk enhancements into the jsonb branch, and especially the finer-grain characterization of JSON function properties. (check-in: [72393b003f] user: drh branch: jsonb, size: 174424)
16:37
[82d1237899] part of check-in [b2b62546c4] More precise characterization of JSON functions. Indicate when functions might return JSON (subtype 'J') and when they make use of the function argument cache. (check-in: [b2b62546c4] user: drh branch: trunk, size: 112276)
2023-11-03
12:09
[e109da4d5f] part of check-in [b12110276f] Enhance the JSONB lookup routine with logic to apply edits. The new logic is currently unused and hence untested but does not create any regressions. (check-in: [b12110276f] user: drh branch: jsonb, size: 173945)
2023-10-19
20:46
[2c0599c54a] part of check-in [f47a8d0a20] Merge recent trunk enhancements into the jsonb branch. (check-in: [f47a8d0a20] user: drh branch: jsonb, size: 170752)
2023-10-17
19:33
[d69c6e28ff] part of check-in [37ff0d8e7f] Fix a harmless compiler warning about variant types for a pointer function. (check-in: [37ff0d8e7f] user: drh branch: trunk, size: 111781)
13:47
[efa31f318e] part of check-in [3161c2cdc9] Fix a JSON bug introduced 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. (check-in: [3161c2cdc9] user: drh branch: branch-3.43, size: 111769)
13:41
[a803f6eb68] part of check-in [e5099c549a] Fix a JSON bug introduced by the optimization of [df099ad713011b67] and 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]. (check-in: [e5099c549a] user: drh branch: trunk, size: 111861)
2023-10-11
17:34
[dcccb1617b] part of check-in [7dcd9cfedc] Fix the use of an uninitialized value that occurs when doing a json_insert() of a string value that contains embedded U+0000 characters. (check-in: [7dcd9cfedc] user: drh branch: branch-3.43, size: 111730)
17:24
[799430345d] part of check-in [d3c0cbb909] Fix the use of an uninitialized value that occurs when doing a json_insert() of a string value that contains embedded U+0000 characters. (check-in: [d3c0cbb909] user: drh branch: trunk, size: 111822)
17:21
[fc8783af35] part of check-in [fc5ee9e51a] Fix the use of an uninitialized value that occurs when doing a json_insert() of a string value that contains embedded U+0000 characters. (check-in: [fc5ee9e51a] user: drh branch: jsonb, size: 170793)
13:19
[6c394327f0] part of check-in [fb81d570a3] Fix a missing zero-terminator on a string when processing JSON aggregates into JSONB. (check-in: [fb81d570a3] user: drh branch: jsonb, size: 170735)
12:44
[d2b028758b] part of check-in [e50045c222] Fix an issue that can arise when processing corrupt JSONB. (check-in: [e50045c222] user: drh branch: jsonb, size: 170514)
12:21
[4130133dcd] part of check-in [0fbda92bb0] Improved robustness against corrupt JSONB. (check-in: [0fbda92bb0] user: drh branch: jsonb, size: 170496)
11:42
[51ae066d27] part of check-in [a72d54645c] Fix an assertion fault in json_patch() that can occur if the patch JSON is malformed JSONB. Report the malformed JSONB instead. (check-in: [a72d54645c] user: drh branch: jsonb, size: 170677)
2023-10-10
23:02
[d86e0d27c8] part of check-in [35e0108af2] Improved robustness in the decoding of JSON5 text escape sequences found in malformed JSONB. (check-in: [35e0108af2] user: drh branch: jsonb, size: 170593)
18:55
[3a0d5a277d] part of check-in [216191b113] Fix an off-by-one error in the changes from the previous check-in on the jsonb branch. (check-in: [216191b113] user: drh branch: jsonb, size: 169852)
18:42
[fc5b17b021] part of check-in [0caa320d90] Improved robustness when translating corrupt JSONB into JSON text. (check-in: [0caa320d90] user: drh branch: jsonb, size: 169840)
18:32
[e6e3641f54] part of check-in [5cbb861fc6] Fix a potential buffer overrun due to corrupt JSONB. (check-in: [5cbb861fc6] user: drh branch: jsonb, size: 169559)
18:04
[7df84bb5b9] part of check-in [c96eb7fb61] Fix bugs uncovered by the fuzzer. (check-in: [c96eb7fb61] user: drh branch: jsonb, size: 169569)
2023-10-09
18:33
[bbf52181d0] part of check-in [db44bd1d62] Systematize the names of some of the translation function in the JSON implementation. (check-in: [db44bd1d62] user: drh branch: jsonb, size: 169418)
12:57
[8717fe7a64] part of check-in [9422c24f4a] Merge the latest trunk fixes and enhancements into the jsonb branch, and especially the JSON cache spill UAF fix. (check-in: [9422c24f4a] user: drh branch: jsonb, size: 169258)
12:51
[5c25f82e1c] part of check-in [5b09212ac0] Fix a potential UAF caused by JSON parser cache spill. (check-in: [5b09212ac0] user: drh branch: branch-3.43, size: 111672)
12:46
[82b9cef53e] part of check-in [a163fecca9] Fix a potential UAF caused by JSON parser cache spill. [forum:/forumpost/b25edc1d46|Forum post b25edc1d46]. (check-in: [a163fecca9] user: drh branch: trunk, size: 111764)
2023-10-07
23:35
[e97d03f1c1] part of check-in [cbea16c29e] Remove some unnecessary code. Report errors for invalid JSONB input on an extract. (check-in: [cbea16c29e] user: drh branch: jsonb, size: 169198)
19:46
[6b0c502122] part of check-in [7b52b266b0] The return from sqlite3_value_blob() in jsonFuncArgMightBeBinary() might be a NULL pointer. Check for that case. (check-in: [7b52b266b0] user: drh branch: jsonb, size: 169339)
19:40
[98ef9894e3] part of check-in [ed99a78841] Improved detection of malformed JSONB when parsing it into a JsonNode array. (check-in: [ed99a78841] user: drh branch: jsonb, size: 169327)
19:05
[f526f06000] part of check-in [8d6d04ca97] Fix the jsonbChangePayloadSize() routine so that it shifts the payload in order to always render the most compact encoding of the payload size. This is necessary as sometimes (as discovered by dbsqlfuzz) the payload size can grow significantly due to json_insert() or json_replace(). (check-in: [8d6d04ca97] user: drh branch: jsonb, size: 169127)
17:50
[a5d273004e] part of check-in [2f3388f14c] Improvements to error messages returned when the ->> operator fails. (check-in: [2f3388f14c] user: drh branch: jsonb, size: 168434)
11:36
[969f4897a6] part of check-in [96cfdc31e3] Improved error messages from search on JSONB. (check-in: [96cfdc31e3] user: drh branch: jsonb, size: 168799)
09:13
[e1a1da1393] part of check-in [1f4d326825] Report unknown JSONB element type when parsing JSONB into JsonNode. (check-in: [1f4d326825] user: drh branch: jsonb, size: 168519)
2023-10-06
23:02
[4d2527a8f0] part of check-in [ab2bf3e359] Correct handling of "raw" strings in JSON. This requires three test-case changes in TH3 to add double-quotes to the path outputs from json_tree(). The new behavior is correct, I believe. (check-in: [ab2bf3e359] user: drh branch: jsonb, size: 168537)
22:16
[b806a942b8] part of check-in [6945e11aa4] Improved error detection for JSONB inputs. (check-in: [6945e11aa4] user: drh branch: jsonb, size: 168608)
18:21
[7a37b75ae7] part of check-in [fe326829c2] Incremental improvements to the JSONB logic. (check-in: [fe326829c2] user: drh branch: jsonb, size: 168574)
15:35
[07cbae93a6] part of check-in [5a17e4479a] Fixes to rendering JSON5 extensions encoded as JSONB. (check-in: [5a17e4479a] user: drh branch: jsonb, size: 168217)
14:59
[e1a4c5ffad] part of check-in [5227add3c8] Fix compiler warnings. (check-in: [5227add3c8] user: drh branch: jsonb, size: 168149)
14:52
[fe8cd7b38e] part of check-in [b41dd237fb] Improvements to error handling. (check-in: [b41dd237fb] user: drh branch: jsonb, size: 168072)
13:05
[e89b89a6f3] part of check-in [6409d30791] Merge compiler warning fixes from trunk into the jsonb branch. (check-in: [6409d30791] user: drh branch: jsonb, size: 167697)
12:51
[c6675e01fc] part of check-in [f3b3d712d6] Ensure that all fields of static sqlite3_module objects are explicitly initialized, in order to hush-up nuisance compiler warnings. (check-in: [f3b3d712d6] user: drh branch: trunk, size: 111704)
00:06
[6758202d3f] part of check-in [563cde404c] Improvements to coping with malformed JSONB. (check-in: [563cde404c] user: drh branch: jsonb, size: 167605)
2023-10-05
23:05
[1b3349c49b] part of check-in [6e8e0eedbf] Better error detection when doing a lookup on a JSONB. (check-in: [6e8e0eedbf] user: drh branch: jsonb, size: 167586)
22:52
[a51a9dd785] part of check-in [ac74d78776] Improvements to comments. No changes to code. (check-in: [ac74d78776] user: drh branch: jsonb, size: 167463)
20:17
[e8befacf28] part of check-in [0f75199160] Turn an unreachable branch into an assert(). (check-in: [0f75199160] user: drh branch: jsonb, size: 167241)
18:33
[91ba143709] part of check-in [df1fbbeb83] Fix the parsing of non-standard "Infinity" and "NaN" values from text into JSONB. (check-in: [df1fbbeb83] user: drh branch: jsonb, size: 167247)
18:09
[436cc9b8a4] part of check-in [425f0b85a6] Change the json_valid(X) routine to return true whenever X is a blob that could plausibly be a valid JSONB. (check-in: [425f0b85a6] user: drh branch: jsonb, size: 167282)
17:52
[5b00523c23] part of check-in [564edb3b6d] Fix the text-to-JSONB parser so that it handles some JSON5 floating point literals correctly. (check-in: [564edb3b6d] user: drh branch: jsonb, size: 167058)
16:33
[5fce177a1f] part of check-in [487781be8a] Slightly stricter testing for when a BLOB is valid JSONB: If the element is a null, true, or false, its payload size must be zero. (check-in: [487781be8a] user: drh branch: jsonb, size: 167058)
15:05
[85d3615672] part of check-in [bf4b36eda8] Fix a memory leak following a syntax error in jsonb(). (check-in: [bf4b36eda8] user: drh branch: jsonb, size: 166966)
15:02
[7f765a31a4] part of check-in [bae5071b08] Allow the PG-style syntax for the PATH operand on the right-hand side of the ->> and -> operators. (check-in: [bae5071b08] user: drh branch: jsonb, size: 166937)
2023-10-03
22:40
[52e4fa529c] part of check-in [08e7db138b] Fix a memory leak in JSON group-aggregates when the output is JSONB. (check-in: [08e7db138b] user: drh branch: jsonb, size: 166043)
21:54
[62de483f16] part of check-in [dca684da0c] Fix a bug in the jsonReturnFromBlob() function that causes a positive result for a negative value for when a JSON integer is too large and needs to be converted into double. (check-in: [dca684da0c] user: drh branch: jsonb, size: 165907)
20:58
[6b11a18b09] part of check-in [fefa4475c4] Fix problems in the "json" output column of the json_tree() virtual table for the case when the input is JSONB. (check-in: [fefa4475c4] user: drh branch: jsonb, size: 165874)
20:01
[0be3a2d1d6] part of check-in [562e8e7b08] Augment the jsonBlobChangePayloadSize() routine so that it tries to shift content in order to render the payload size in its minimal form. (check-in: [562e8e7b08] user: drh branch: jsonb-opt1, size: 166681)
19:37
[6a6437fce0] part of check-in [ef5956710b] Improved handling of OOM while translating the JsonNode representing into the BLOB representation. (check-in: [ef5956710b] user: drh branch: jsonb, size: 165763)
10:59
[7ed190ae57] part of check-in [355acfb188] Fix a problem in the JSONB parser that comes up following an OOM. (check-in: [355acfb188] user: drh branch: jsonb, size: 165615)
10:43
[87218d0698] part of check-in [808bd349ba] Fix an issue with the use of jsonb_group_array() and jsonb_group_object() when used by window functions. (check-in: [808bd349ba] user: drh branch: jsonb, size: 165599)
2023-10-02
20:16
[a2e70610cc] part of check-in [54197149b8] Fix jsonb_insert() so that it does not behave like jsonb_set(). New test cases added. (check-in: [54197149b8] user: drh branch: jsonb, size: 165527)
14:51
[a75a4bfff4] part of check-in [d624c31e5c] New test cases for JSONB. (check-in: [d624c31e5c] user: drh branch: jsonb, size: 165474)
13:35
[643f1553f9] part of check-in [95eb7b37fa] Allow json_replace() to accept JSONB arguments as the new value. (check-in: [95eb7b37fa] user: drh branch: jsonb, size: 165472)
13:20
[057ce1f7bc] part of check-in [14f20ecbfa] Improvements to error handling for BLOB inputs on JSON. (check-in: [14f20ecbfa] user: drh branch: jsonb, size: 165326)
12:40
[e815a5e2f5] part of check-in [c352201b8c] Gather forward references into a single place for the JSON code. Allow JSONB arguments to json_array() and json_object() and similar. (check-in: [c352201b8c] user: drh branch: jsonb, size: 165617)
2023-10-01
18:59
[253ca59ae7] part of check-in [0d8cd6b5fb] Fix problems following OOM in JSONB parsing. (check-in: [0d8cd6b5fb] user: drh branch: jsonb, size: 165469)
2023-09-30
14:34
[d4de26b1c8] part of check-in [6daa7b6969] Finish adding jsonb_ versions for all JSON routines that return JSON text. (check-in: [6daa7b6969] user: drh branch: jsonb, size: 165365)
2023-09-29
22:37
[50fb4f1c25] part of check-in [bb5e50ff56] Update json_each() and json_tree() so that they work with JSONB inputs. (check-in: [bb5e50ff56] user: drh branch: jsonb, size: 163787)
19:47
[2112b76a0d] part of check-in [96f545f6f8] The u.zJContent field of JsonNode for a string or label should NOT include the quotation mark delimiters. Ever. This is an inefficiency that really ought to be fixed on trunk, but that can wait until this branch lands. (check-in: [96f545f6f8] user: drh branch: jsonb, size: 163557)
16:37
[d7de857317] part of check-in [45dd176087] Additional refactoring and cleanup. (check-in: [45dd176087] user: drh branch: jsonb, size: 163672)
15:18
[3464ae5e1c] part of check-in [c794aeb374] Bad edit (check-in: [c794aeb374] user: drh branch: mistake, size: 163668)
12:45
[92d7c2ea8d] part of check-in [9b620d813e] Improvements to comments and procedure names for clarity in the JSON implementation. (check-in: [9b620d813e] user: drh branch: jsonb, size: 163612)
11:17
[6d26431183] part of check-in [1c0cba3461] Describe the JSONB encoding in a header comment to the json.c source file. (check-in: [1c0cba3461] user: drh branch: jsonb, size: 161944)
2023-09-28
19:11
[6ecde7714a] part of check-in [1744bfc669] Fix some minor memory issues so that all legacy tests now pass. (check-in: [1744bfc669] user: drh branch: jsonb, size: 157066)
17:23
[7e68346bfc] part of check-in [3de58ec994] Extract directly from BLOB is now complete and appears to work. (check-in: [3de58ec994] user: drh branch: jsonb-direct-extract, size: 156980)
17:07
[946e0bbc50] part of check-in [5c0815fa2e] Miscellaneous bugs fixed. (check-in: [5c0815fa2e] user: drh branch: jsonb-direct-extract, size: 157132)
15:56
[c9d70a47aa] part of check-in [8c82576176] Improvements to json_extract() to better support JSONB. Still not 100% working. (check-in: [8c82576176] user: drh branch: jsonb-direct-extract, size: 156767)
10:20
[1f174d19f1] part of check-in [c1feba70f5] Work toward getting json_extract() to operate directly on the BLOB, omitting the translation into a JsonNode array. (check-in: [c1feba70f5] user: drh branch: jsonb-direct-extract, size: 156047)
2023-09-26
19:30
[6fb31345d2] part of check-in [e6045b4e1b] Add in many jsonb_xxxx() interfaces. Still uses the internal JsonNode representation for transformations and search, but it does at least conform to the desired API design. Largely untested. (check-in: [e6045b4e1b] user: drh branch: jsonb, size: 146540)
2023-09-25
17:14
[ee823133ed] part of check-in [a82ebbac3c] When parsing JSON text into the BLOB format, only use node type JSONB_TEXTJ for an unquoted object label if the object label contains escape sequences. (check-in: [a82ebbac3c] user: drh branch: jsonb, size: 141173)
13:23
[23efc117c4] part of check-in [14f2e95a9e] As a temporary measure, try to translate the BLOB JSON format into the legacy node format for processing. (check-in: [14f2e95a9e] user: drh branch: jsonb, size: 140690)
2023-09-22
16:20
[522ebfebd7] part of check-in [8b53b2e660] Fix minor parse-to-BLOB bugs. (check-in: [8b53b2e660] user: drh branch: jsonb, size: 135996)
14:33
[574ed4c90f] part of check-in [0b70cb77a4] Add the ability to render a binary BLOB back into valid canonical JSON. (check-in: [0b70cb77a4] user: drh branch: jsonb, size: 136024)
12:16
[351f2b9984] part of check-in [b817dd865e] Begin adding code to render binary JSON back into text. Very incomplete. This is an incremental check-in. (check-in: [b817dd865e] user: drh branch: jsonb, size: 132123)
11:20
[4a25369c2f] part of check-in [2c89ae5d02] Improvements to the JSON binary BLOB format design. (check-in: [2c89ae5d02] user: drh branch: jsonb, size: 137546)
2023-09-21
18:16
[909c1ed65c] part of check-in [dc23e783d4] Reorganize the code to put the new JSONB routines together, for easier editing. (check-in: [dc23e783d4] user: drh branch: jsonb, size: 129032)
17:51
[aa191fb04f] part of check-in [8131b3c272] Initial development code for an experimental binary BLOB encoding for JSON. (check-in: [8131b3c272] user: drh branch: jsonb, size: 128799)
2023-08-30
18:19
[51141f1c09] part of check-in [69a635958a] Fix a bug in json_array_length() introduced in version 3.43.0 by check-in [df099ad713011b67]. If the JSON input comes from json_remove(), the removed array entries are still counted as part of the array length. Bug report in [forum:/forumpost/0560d5e482|forum post 0560d5e482]. (check-in: [69a635958a] user: drh branch: trunk, size: 111612)
2023-08-11
11:12
[ae840f87b4] part of check-in [15c2eadbff] Up until version 3.42.0, there was a bug in json_valid() such that it would return False (0) for a NULL input. That bug is fixed in 3.42.0. This check-in adds a compile-time option -DSQLITE_LEGACY_JSON_VALID that restores the old buggy behavior for applications that depend on it. (check-in: [15c2eadbff] user: drh branch: legacy-json-valid, size: 111549)
2023-08-04
13:19
[9c231a8532] part of check-in [ba7a66db13] Fix a bug in the jsonLookup() routine used to search JSON. Bug was introduced by the recent (unreleased) JSON caching enhancements check-in [a4c1af616e672a0d] merged into trunk at [df099ad713011b67]. (check-in: [ba7a66db13] user: drh branch: trunk, size: 111396)
2023-08-03
18:14
[d2b7f613a1] part of check-in [65a8716d8a] Fix harmless scan-build warnings. (check-in: [65a8716d8a] user: drh branch: trunk, size: 111242)
2023-08-02
16:06
[cea55234b9] part of check-in [ea0b9aecba] Performance optimization for JSON rendering logic. (check-in: [ea0b9aecba] user: drh branch: trunk, size: 111150)
2023-07-28
20:59
[0bcc2e0338] part of check-in [8e781c6742] Do not allow the same JSON parse to be input to both arguments to the json_patch() routine. (check-in: [8e781c6742] user: drh branch: trunk, size: 111065)
12:59
[b3d1811118] part of check-in [a0de01108c] A failed attempt to add a new sqlite3_result_zeroterminated() interface that is a hint to SQLite that a TEXT result does have a zero terminator. The idea is to avoid unnecessary copying of TEXT values. This seems like an unnecessary complication at the moment, but maybe I'll return to this later. Note that this check-in does not work - it is a proof of concept only. (check-in: [a0de01108c] user: drh branch: sqlite3_result_zeroterminated, size: 111154)
2023-07-27
23:51
[60b6b0815d] part of check-in [2ed9c59e6a] Switch to using jsonParseCached() for json_patch(). (check-in: [2ed9c59e6a] user: drh branch: json-opt, size: 111038)
20:28
[481dffa457] part of check-in [509ae9c147] If the input JSON to a json function that uses cache comes from an RCStr value, then use that RCStr value in the parse rather than making a copy. (check-in: [509ae9c147] user: drh branch: json-opt, size: 111330)
00:21
[c992d2a87a] part of check-in [837f2907e1] Fix a performance regression in JSON associated with generating small snippets of JSON from a larger JSON string. See [forum:/forumpost/15d6bd9cd37202a7|forum thread 15d6bd9cd37202a7]. (check-in: [837f2907e1] user: drh branch: trunk, size: 110909)
2023-07-26
23:22
[bea467f5bb] part of check-in [9edd671621] Reduce the number of memory allocations when parsing JSON. (check-in: [9edd671621] user: drh branch: trunk, size: 110745)
21:53
[8c21f66368] part of check-in [ec8b43382e] Minor changes to make coverage testing easier. (check-in: [ec8b43382e] user: drh branch: trunk, size: 111312)
19:22
[e3675df7ed] part of check-in [04f497074b] Change a switch() case to default for coverage. (check-in: [04f497074b] user: drh branch: trunk, size: 111237)
19:11
[00ee51e836] part of check-in [01d52232dd] Make sure jsonReplaceNode() always leaves the JsonParse in a consistent state even if an error is encountered. (check-in: [01d52232dd] user: drh branch: trunk, size: 111246)
18:13
[18631bcf12] part of check-in [29c7b1cbc4] Make sure jsonReplaceNode() always leaves the JsonParse in a consistent state even if an error is encountered. (check-in: [29c7b1cbc4] user: drh branch: mistake, size: 111377)
13:17
[512bc389b4] part of check-in [1bf85d4e38] Change the debugging "json_parse(X)" function so that it shows a more complete description of the JsonParse object on standard output and returns the mimified JSON. Former behavior was to return the text of a decode of the aNode array. (check-in: [1bf85d4e38] user: drh branch: json-opt, size: 111202)
11:53
[c784b923a8] part of check-in [cd5fda8c2e] More comment improvements in json.c. Do not run jsonLookup() following an OOM error. (check-in: [cd5fda8c2e] user: drh branch: json-opt, size: 110791)
11:43
[15ca3c2dfd] part of check-in [bac953a80d] Improved comments and other cleanup for the changes on this branch. (check-in: [bac953a80d] user: drh branch: json-opt, size: 110756)
11:00
[b3f20f01dc] part of check-in [134b01f37f] Fix jsonForceRCStr() to also add the NULL terminator. (check-in: [134b01f37f] user: drh branch: json-opt, size: 110404)
01:05
[790ca70b1f] part of check-in [2dbb22c75e] Extend the enhancement to json_set() and json_replace(). Clean up cruft. (check-in: [2dbb22c75e] user: drh branch: json-opt-rcstr, size: 110386)
00:48
[a7823b0593] part of check-in [f930b139d6] Add the JsonParse.zAlt field to old revised JSON text after a change. Demonstrate that this elminates the need for reparsing after a change by using it in the json_remove() function. This is an incremental check-in containing lots of cruft. (check-in: [f930b139d6] user: drh branch: json-opt-rcstr, size: 110463)
2023-07-25
20:26
[97f8c20c1c] part of check-in [afe02a398a] Clarify ownership of the various objects involved in parsing JSON. (check-in: [afe02a398a] user: drh branch: json-opt-rcstr, size: 107933)
18:28
[28fe8ed9e6] part of check-in [4cb15d934a] Incremental improvements to JSON parsing - trying to fold in the RCStr object. (check-in: [4cb15d934a] user: drh branch: json-opt-rcstr, size: 109613)
15:43
[8f44f1aadf] part of check-in [c456e4a899] Fix a minor problem with error reporting in JSON. (check-in: [c456e4a899] user: drh branch: json-opt-rcstr, size: 105622)
15:08
[3add12eb29] part of check-in [c1b8725089] Create the new RCStr class of strings and try to use them for JSON storage. (check-in: [c1b8725089] user: drh branch: json-opt-rcstr, size: 105605)
00:13
[a75e5671ab] part of check-in [075eb09a4f] First attempt to cache modified JSON parses. Does not work. This is an incremental check-in. (check-in: [075eb09a4f] user: drh branch: json-opt-wcache1, size: 106830)
2023-07-24
23:27
[fc5b67025d] part of check-in [28c6e964b1] It is an error to try to insert a BLOB value into JSON. (check-in: [28c6e964b1] user: drh branch: json-opt, size: 105243)
22:45
[a12c551713] part of check-in [327fff501e] Clean up some #defines in json. (check-in: [327fff501e] user: drh branch: json-opt, size: 105076)
22:34
[e743eb83ad] part of check-in [ecdcb1ded7] Rework the JSON parse structure to facilitate better caching. Passes all tests. (check-in: [ecdcb1ded7] user: drh branch: json-opt, size: 105183)
17:59
[3584f5fb0f] part of check-in [f2c0638846] Incremental progress toward improved caching of parsed JSON. (check-in: [f2c0638846] user: drh branch: json-opt, size: 104419)
12:37
[d34d10ea15] part of check-in [00bfc4918b] Merge the latest trunk enhancements into the json-opt branch. (check-in: [00bfc4918b] user: drh branch: json-opt, size: 99991)
2023-07-21
18:09
[46ea5566e1] part of check-in [1e5df0aa3d] Further improvements to large string handling in relation to JSON. (check-in: [1e5df0aa3d] user: drh branch: big-function-text, size: 98651)
15:01
[2bf3223892] part of check-in [d0278cdedf] Multiple optimizations that try to preserve or infer the zero-terminated property of TEXT values. Avoid unnecessary copying of text values destined to become function parameters. All changes help improve performance of doing UPDATEs on large JSON values that are indexed multiple ways. (check-in: [d0278cdedf] user: drh branch: big-function-text, size: 98678)
11:09
[3bdc8916ee] part of check-in [1955e66cfc] More infrastructure changes towards improving JSON cache performance. Incremental check-in. (check-in: [1955e66cfc] user: drh branch: json-opt, size: 99964)
2023-07-20
17:45
[888fcc121f] part of check-in [e384163a47] Experimental framework upon which to build a better JSON parse structure that supports cached of modified JSON. All of these changes are tentative and subject to change or removal. Incremental check-in. (check-in: [e384163a47] user: drh branch: json-opt, size: 99426)
2023-07-19
17:24
[e48136fce6] part of check-in [144c8ccf6e] Further improvement to JSON parser performance. (check-in: [144c8ccf6e] user: drh branch: json-opt, size: 98624)
15:06
[4a875e61ce] part of check-in [adb4d6b007] Further performance enhancements to JSON parsing and rendering. Total performance gain for large JSONs so far on this branch is about 11%. (check-in: [adb4d6b007] user: drh branch: json-opt, size: 97681)
13:50
[a1e70adf94] part of check-in [c9fbe0185c] Performance optimization for parsing large JSONs that contain lots of text. (check-in: [c9fbe0185c] user: drh branch: json-opt, size: 96898)
12:52
[c011e8a5c2] part of check-in [2e6fbebc41] Enhance the JSON parser cache such that it is able to extract lines from the cache and use them for writing, though they then have to be evicted from the cache. This was an experiment in trying to reduce the amount of parsing needed for a big UPDATE, but it does not seem to help any. Retained for reference only. (check-in: [2e6fbebc41] user: drh branch: json-write-cache, size: 98136)
2023-06-07
17:03
[14c474fb12] part of check-in [8c291d9994] Fix straggler misspellings and tidy the custom dictionary. Also include pickups from [forum:/info/c61fb09afd|forum post c61fb09afd]. (check-in: [8c291d9994] user: larrybr branch: spell-check, size: 96842)
08:40
[89170fc7a4] part of check-in [26c1bb4bd9] Add a C-source spell-checking facility. make misspell (on Nix) (check-in: [26c1bb4bd9] user: larrybr branch: spell-check, size: 96841)
2023-05-08
11:11
[39b1c7527f] part of check-in [c335737c28] Ensure that the label for a JSON object really is a string and not an array or object that just happens to end with a string. dbsqfuzz 32f62ed8676d0a153dbe756aeae3202d3670fe50. (check-in: [c335737c28] user: drh branch: trunk, size: 96841)
2023-05-05
20:22
[2ccd22e631] part of check-in [3f30ea5ec9] Fix a comment in the JSON logic. No code changes. (check-in: [3f30ea5ec9] user: drh branch: trunk, size: 96818)
15:52
[eba5afc4de] part of check-in [c7697a0d45] Reduce the maximum depth of nesting in json objects to 1000. (check-in: [c7697a0d45] user: dan branch: trunk, size: 96756)
2023-05-03
06:38
[7297dbd1d6] part of check-in [d40fd5924a] Improved detection of excess recursion on arrays and objects in the JSON parser. Fixes a problem detected by dbsqlfuzz. (check-in: [d40fd5924a] user: drh branch: trunk, size: 96756)
2023-05-02
17:33
[2cbf343884] part of check-in [6bee0a19e2] Allow for lower-case "nan" to mean NaN in JSON. (check-in: [6bee0a19e2] user: drh branch: trunk, size: 96804)
11:12
[acb60ec158] part of check-in [ab78e6946b] Improved handling of NULL arguments to json_valid() and json_error_position(). [forum:/forumpost/06c6334412|Forum post 06c6334412]. (check-in: [ab78e6946b] user: drh branch: trunk, size: 96776)
2023-05-01
20:42
[d24acf11f2] part of check-in [342af5b4fa] Fix harmless compiler warnings. (check-in: [342af5b4fa] user: drh branch: trunk, size: 96662)
18:52
[77686019ed] part of check-in [0a92699469] Fix harmless compiler warnings. (check-in: [0a92699469] user: drh branch: trunk, size: 96654)
03:56
[dd76caa9c9] part of check-in [1b991c7814] Fix abbreviated paths for objects such that they work even if the object key begins with '$'. (check-in: [1b991c7814] user: drh branch: json5, size: 96654)
2023-04-30
23:52
[359e99789c] part of check-in [e18c0899cc] Fix a problem with json_patch() when one side or the other is JSON5. dbsqlfuzz bc10593a4ba8e7a7862593532285be31f00f8e41 (check-in: [e18c0899cc] user: drh branch: json5, size: 96603)
20:37
[0915244c5e] part of check-in [9be2c87518] Accept the full ECMAScript 5.1 IdentifyName syntax for keys in objects. (check-in: [9be2c87518] user: drh branch: json5, size: 96382)
19:45
[bd22944b15] part of check-in [fb551145e0] All JSON to understand floating point literals "Inf" and "QNaN" and "SNaN" in any case, without the SQLITE_EXTENDED_NAN_INF compile-time option. This extension is always available. (check-in: [fb551145e0] user: drh branch: json5, size: 96025)
19:34
[d216510dbb] part of check-in [34c4e900a9] Omit the json_valid() function. Change the name of json_error() to json_error_position(). Use "NOT json_error_position(X)" as a substitute for "json_valid5(X)". (check-in: [34c4e900a9] user: drh branch: json5, size: 96721)
2023-04-29
17:35
[f76772b2d7] part of check-in [770b09f7a7] More ALWAYS() macros. (check-in: [770b09f7a7] user: drh branch: json5, size: 96357)
17:13
[0de525ac85] part of check-in [91e15ed9d9] Add ALWAYS macros on unreachable branches in the new JSON5 logic. (check-in: [91e15ed9d9] user: drh branch: json5, size: 96341)
16:31
[6029d4ce87] part of check-in [01ee613c07] Simplification of the logic that normalizes JSON5 integer literals into canonical JSON integer literals. Improved reporting of OOM. (check-in: [01ee613c07] user: drh branch: json5, size: 96317)
16:00
[1de9706f7b] part of check-in [3e91494390] Do not allow leading zeros on non-zero numeric literals in JSON. (check-in: [3e91494390] user: drh branch: json5, size: 96142)
12:13
[a25afd49ab] part of check-in [2fe684cdcd] Minor fixes to to the JSON% parser. (check-in: [2fe684cdcd] user: drh branch: json5, size: 96170)
00:59
[3535ddb77b] part of check-in [4473dc8e3a] Correctly recognize an isolated U+feff as a space character in JSON5. (check-in: [4473dc8e3a] user: drh branch: json5, size: 96254)
2023-04-28
23:38
[92a84ce1c9] part of check-in [c736b77a2f] Bug fixes in the logic to skip over JSON5 comments. (check-in: [c736b77a2f] user: drh branch: json5, size: 96241)
23:19
[cc36f7df74] part of check-in [8f7ab5d921] Bug fix in the offset computation for json_error(). (check-in: [8f7ab5d921] user: drh branch: json5, size: 95974)
17:38
[03eba427c0] part of check-in [8d09dc1c45] Improvements to the accuracy of json_error(). Add the extension SQL functions random_json(SEED) and random_json5(SEED). (check-in: [8d09dc1c45] user: drh branch: json5, size: 95972)
14:48
[b532d42d31] part of check-in [901ad995d5] Add the json_error(X) function that returns the 1-based character offset to the first syntax error in JSON5 string X, or 0 if there are no errors. (check-in: [901ad995d5] user: drh branch: json5, size: 95918)
11:02
[7d03a1185d] part of check-in [f56528d413] Fix json_tree() so that it is able to deal with the JNODE_RAW labels of a JSON5 object. (check-in: [f56528d413] user: drh branch: json5, size: 93717)
2023-04-27
23:29
[76c7d11f7a] part of check-in [bc84a82e4d] Test cases added, and some bugs fixed. (check-in: [bc84a82e4d] user: drh branch: json5, size: 93881)
19:30
[1c1cc509dd] part of check-in [bb8f1c16f2] Further optimizations to the JSON parser. (check-in: [bb8f1c16f2] user: drh branch: json5, size: 93636)
19:13
[dc5befb58a] part of check-in [58398292e8] Faster implementation of numberic literal parsing in JSON. (check-in: [58398292e8] user: drh branch: json5, size: 93841)
18:28
[e2830f713a] part of check-in [85e00c9e68] Add support for hexadecimal integer literals in JSON. (check-in: [85e00c9e68] user: drh branch: json5, size: 93586)
17:32
[530e1f4f48] part of check-in [c13346afbe] All floating point literals "NaN" and "Infinity". Additional variants of these literals are available if compiled with SQLITE_EXTENDED_NAN_INF. (check-in: [c13346afbe] user: drh branch: json5, size: 93424)
16:57
[d1a73af4f4] part of check-in [d92a6ab287] Fix handling of reverse solidus in string literals. Allow decimal points in floating point literals to occurs and the beginning or end of the mantissa. (check-in: [d92a6ab287] user: drh branch: json5, size: 92765)
16:24
[cdf05600af] part of check-in [676877aca2] Fix the handling of escape solidus in the JSON routines. (check-in: [676877aca2] user: drh branch: json5, size: 92205)
15:48
[d0a088f852] part of check-in [66da4bd4a3] JSON string literals may span multiple lines by escaping new line characters. (check-in: [66da4bd4a3] user: drh branch: json5, size: 92221)
15:11
[22e67e7ae7] part of check-in [fb428db3f6] Allow the labels on JSON objects to be unquoted identifier names. (check-in: [fb428db3f6] user: drh branch: json5, size: 91429)
14:38
[d65da6a334] part of check-in [5a88ba743f] Performance optimization in the JSON parser. (check-in: [5a88ba743f] user: drh branch: json5, size: 90996)
13:44
[28ca7f26c2] part of check-in [93f3ab26b5] Permit JSON5 whitespace in all contexts of objects and arrays. (check-in: [93f3ab26b5] user: drh branch: json5, size: 90324)
12:24
[e872bb2ba6] part of check-in [14e82f36ee] Translate JSON5-only string literal escape sequences into the JSON equivalents. (check-in: [14e82f36ee] user: drh branch: json5, size: 89545)
2023-04-26
20:26
[f82b86599b] part of check-in [9508efa9d6] Implement some of the JSON5 enhancements to string and numeric literals. This is an incremental check-in of work in progress. (check-in: [9508efa9d6] user: drh branch: json5, size: 88920)
17:30
[a346dbe636] part of check-in [78404dc370] Partial implementation of JSON5 numeric literal extensions. Use a switch() statement in the parser for better performance. (check-in: [78404dc370] user: drh branch: json5, size: 85769)
15:19
[d0f9a0c630] part of check-in [d262c05945] Work toward implementing JSON5 whitespace. Untested and incomplete. (check-in: [d262c05945] user: drh branch: json5, size: 85120)
2023-04-25
21:24
[1d049d073c] part of check-in [5d33ab7780] The json_valid() function only returns true for pure JSON. JSON5 (or at least that subset of JSON5 that has been so far implemented) is accepted by all routines, but json_valid() still returns false for JSON5 inputs. The new json_valid5(X) routine returns true or false if X is or is not valid JSON5. All of this is experimental and subject to change. (check-in: [5d33ab7780] user: drh branch: json5, size: 81820)
2023-04-24
23:14
[ebb5827e6a] part of check-in [4031b231c2] Allow trailing commas in objects and arrays of JSON. (check-in: [4031b231c2] user: drh branch: json5, size: 81293)
2023-04-02
20:46
[edae65fe1f] part of check-in [dbc9966208] More off-by-one errors in the new JSON parsing. (check-in: [dbc9966208] user: drh branch: json-nan-inf, size: 81365)
20:27
[442e035cca] part of check-in [f7ebf3e628] Fix an off-by-one error in the recognition of -Infinity. (check-in: [f7ebf3e628] user: drh branch: json-nan-inf, size: 81365)
2023-04-01
23:29
[5ac77e4199] part of check-in [fc8793e5ac] Allow special floating-point value names in JSON: "inf", "-inf", "infinity", "-infinity", "nan", "qnan", and "snan". All are converted into valid JSON values: 9e999, -9e999, or null. Requires the SQLITE_ENABLE_JSON_NAN_INF compile-time option to operate. (check-in: [fc8793e5ac] user: drh branch: json-nan-inf, size: 81365)
2023-03-22
20:21
[29375e70f7] part of check-in [96ec830645] Add the SQLITE_ENABLE_NAN_INF compile-time option which makes the following behavior changes: (1) sqlite3_value_double(NULL) returns NaN, (2) SQLite preserves NaN values rather than converting them to NULL. (3) CAST statements understand "NaN" and "Inf" and make the right conversions. (4) Non-standard JSON is never generated by SQLite JSON routines, but those routines will accept floating point literals "NaN", "Inf", and "-Inf". (check-in: [96ec830645] user: drh branch: nan-inf, size: 80662)
2023-03-17
20:31
[9e3a6acf9e] part of check-in [efce4690a5] Fix json rendering so that it shows positive and negative infinity as 9.0e+999 and -9.0e+999 respectively. (check-in: [efce4690a5] user: drh branch: numeric-only-json, size: 79736)
2023-01-20
13:34
[c85ed6fce0] part of check-in [edcb83fa0d] The json_group_array(), json_group_object(), and fts5_source_id() functions should all be deterministic and innocuous. (check-in: [edcb83fa0d] user: drh branch: trunk, size: 79648)
2023-01-17
15:46
[f68c386e88] part of check-in [ce18f0ed68] Update virtual tables json_each and json_tree so that adding "ORDER BY rowid" to a query does not require an external sort. (check-in: [ce18f0ed68] user: dan branch: trunk, size: 79682)
2022-11-18
17:50
[7634894944] part of check-in [186db57d26] Add the SQLITE_DBCONFIG_LENIENT_JSON configuration option. Modify the built-in JSON routines such that when this setting is active, arguments that that ought to be JSON but still give a reasonable result (ex: NULL) rather than raising an error. (check-in: [186db57d26] user: drh branch: lenient-json, size: 80106)
2022-07-22
20:24
[a39f1702dc] part of check-in [57beb700c0] Add experimental 'xShadowName2' method for virtual table modules. (check-in: [57beb700c0] user: mistachkin branch: xShadowName2, size: 79630)
2022-04-04
15:26
[7ad9c97f36] part of check-in [4a1553b55f] Fix two minor problems in the JSON functions associated with JSON Paths for object labels that require quoting. (check-in: [4a1553b55f] user: drh branch: branch-3.38, size: 79548)
15:15
[7749b98c62] part of check-in [0fbbe7881c] When constructing the JSON Path for the "fullpath" column of the json_tree() and json_each() table-valued functions, be sure to quote object labels where necessary. (check-in: [0fbbe7881c] user: drh branch: trunk, size: 79534)
14:24
[37d4b68b52] part of check-in [84fe95d2a5] Fix the JSON Path parser so that it will accept zero-length object labels. [forum:/forumpost/c082aeab43|Forum thread c082aeab43]. (check-in: [84fe95d2a5] user: drh branch: trunk, size: 79139)
2022-03-08
13:59
[24fcd7f5f9] part of check-in [5e30c6ea70] Fix compiler warnings. (check-in: [5e30c6ea70] user: drh branch: trunk, size: 79104)
2022-02-04
13:15
[225b004221] part of check-in [70049342d5] Fix various harmless compiler warnings. (check-in: [70049342d5] user: drh branch: trunk, size: 79118)
2022-01-17
15:23
[78fdec9af3] part of check-in [5623497adc] Fix incorrect testcase() and assert() macros in json.c. They were not causing problems. The assert() was simply unreachable. The testcase() added an unreachable condition. (check-in: [5623497adc] user: drh branch: trunk, size: 79109)
2022-01-11
22:06
[f3bbaf6a4d] part of check-in [8da07c8b09] Remove vestigial traces of json_ntype(). (check-in: [8da07c8b09] user: drh branch: json-in-core, size: 79125)
18:01
[5dee750a85] part of check-in [22d5138315] Fix the PG-compatible -> and ->> path parsing. (check-in: [22d5138315] user: drh branch: json-in-core, size: 79317)
2022-01-10
15:43
[d3134d392d] part of check-in [39eff3b9bf] Implement the new PG-compliant versions of the -> and ->> operators. (check-in: [39eff3b9bf] user: drh branch: json-in-core, size: 79285)
2022-01-08
15:37
[726f1901ec] part of check-in [e116501c2f] Merge the JSON function enhancements from the json-enhancements branch into json-in-core. (check-in: [e116501c2f] user: drh branch: json-in-core, size: 79939)
2022-01-06
01:40
Renamed and modified ext/misc/json1.c → src/json.c. [973b36a733] part of check-in [583b47d865] An attempt to integrate the JSON functions directly into the SQLite core, rather than holding them as an extension. (check-in: [583b47d865] user: drh branch: json-in-core, size: 76584)