-C json_valid(*,8)\sallows\sminus-signs\son\shexadecimal\sliterals.
-D 2023-12-11T20:19:10.982
+C json_error_position()\snow\suses\sjsonValidityCheck()\sto\sfind\sthe\sapproximate\nposition\sof\san\serror\sin\sa\sJSONB\sblob.
+D 2023-12-11T20:44:21.543
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
F src/hwtime.h f9c2dfb84dce7acf95ce6d289e46f5f9d3d1afd328e53da8f8e9008e3b3caae6
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
F src/insert.c 3f0a94082d978bbdd33c38fefea15346c6c6bffb70bc645a71dc0f1f87dd3276
-F src/json.c d0c018e1d9dba58c09518b15b4d0a1847bc8be7f7f050524618b486c8e286db8
+F src/json.c 191626c46afe3325a01c1a77b7aef6b10b8dc8a76c38757adeca89e51a4248db
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
F src/loadext.c 7432c944ff197046d67a1207790a1b13eec4548c85a9457eb0896bb3641dfb36
F src/main.c ce714ee501122c76eb2e69b292bebe443aba611fc3b88e6786eb910285515fe4
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 4d14e733bb521aed65e98533969d2303738232ae87dab70fdf7962e6513195f5
-R a882161352f3e912beb8ce222b601993
+P c0d7f4520d839a268b3fd2474d0897a9832aa608bd6238b3e287fabecf07a350
+R 3b1676d0420fc714545bd48a8af4a295
U drh
-Z 09da734bc01fda75ed726fff4da7e465
+Z 901bf4bbda4e9c3a1530e623c45e3a19
# Remove this line to create a well-formed Fossil manifest.
**
** If the argument is NULL, return NULL
**
-** If the argument is BLOB, do a fast validity check and return non-zero
-** if the check fails. The returned value does not indicate where in the
-** BLOB the error occurs.
+** If the argument is BLOB, do a full validity check and return non-zero
+** if the check fails. The return value is the approximate 1-based offset
+** to the byte of the element that contains the first error.
**
** Otherwise interpret the argument is TEXT (even if it is numeric) and
** return the 1-based character position for where the parser first recognized
UNUSED_PARAMETER(argc);
memset(&s, 0, sizeof(s));
if( jsonFuncArgMightBeBinary(argv[0]) ){
- JsonString out;
- jsonStringInit(&out, 0);
s.aBlob = (u8*)sqlite3_value_blob(argv[0]);
s.nBlob = sqlite3_value_bytes(argv[0]);
- jsonXlateBlobToText(&s, 0, &out);
- if( out.eErr ){
- iErrPos = (out.eErr & JSTRING_MALFORMED)!=0 ? 1 : -1;
- }
- jsonStringReset(&out);
+ iErrPos = (i64)jsonbValidityCheck(&s, 0, s.nBlob, 0);
}else{
s.zJson = (char*)sqlite3_value_text(argv[0]);
if( s.zJson==0 ) return; /* NULL input or OOM */