1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

Allow trailing commas in objects and arrays of JSON.

FossilOrigin-Name: 4031b231c223db598b45dbd192b027a99a9b82a981d43c75f723a3fb06720b82
This commit is contained in:
drh
2023-04-24 23:14:34 +00:00
parent 7eff609d8a
commit be5bada4d0
4 changed files with 25 additions and 11 deletions

View File

@@ -804,7 +804,7 @@ static int jsonParseValue(JsonParse *pParse, u32 i){
x = jsonParseValue(pParse, j);
if( x<0 ){
pParse->iDepth--;
if( x==(-2) && pParse->nNode==(u32)iThis+1 ) return j+1;
if( x==(-2) ) break;
return -1;
}
if( pParse->oom ) return -1;
@@ -838,7 +838,7 @@ static int jsonParseValue(JsonParse *pParse, u32 i){
x = jsonParseValue(pParse, j);
pParse->iDepth--;
if( x<0 ){
if( x==(-3) && pParse->nNode==(u32)iThis+1 ) return j+1;
if( x==(-3) ) break;
return -1;
}
j = x;