SQLite

Check-in [f0aba0e120]
Login

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

Overview
Comment:Fix corner-case problems in the type and atom columns of json_each() and json_tree().
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f0aba0e120074430cd7ad93291fcc97b8a25a054
User & Date: drh 2015-08-24 02:32:04.608
Context
2015-08-24
12:42
Improvements to JSON string dequoting. (check-in: 196d66d34d user: drh tags: trunk)
06:44
Merge trunk changes with this branch. (check-in: 876810c28b user: dan tags: begin-concurrent)
02:32
Fix corner-case problems in the type and atom columns of json_each() and json_tree(). (check-in: f0aba0e120 user: drh tags: trunk)
2015-08-23
20:48
Fix a comment typo on sqlite3ExprAlloc(). No code changes. (check-in: 518d6220a1 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to ext/misc/json1.c.
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
    }
    case JEACH_VALUE: {
      if( p->eType==JSON_OBJECT && p->i>0 ) pThis++;
      jsonReturn(pThis, ctx, 0);
      break;
    }
    case JEACH_TYPE: {
      if( p->eType==JSON_OBJECT ) pThis++;
      sqlite3_result_text(ctx, jsonType[pThis->eType], -1, SQLITE_STATIC);
      break;
    }
    case JEACH_ATOM: {
      if( p->eType==JSON_OBJECT ) pThis++;
      if( pThis->eType>=JSON_ARRAY ) break;
      jsonReturn(pThis, ctx, 0);
      break;
    }
    case JEACH_ID: {
      sqlite3_result_int64(ctx, (sqlite3_int64)p->i + (p->eType==JSON_OBJECT));
      break;







|




|







1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
    }
    case JEACH_VALUE: {
      if( p->eType==JSON_OBJECT && p->i>0 ) pThis++;
      jsonReturn(pThis, ctx, 0);
      break;
    }
    case JEACH_TYPE: {
      if( p->eType==JSON_OBJECT && p->i>0 ) pThis++;
      sqlite3_result_text(ctx, jsonType[pThis->eType], -1, SQLITE_STATIC);
      break;
    }
    case JEACH_ATOM: {
      if( p->eType==JSON_OBJECT && p->i>0 ) pThis++;
      if( pThis->eType>=JSON_ARRAY ) break;
      jsonReturn(pThis, ctx, 0);
      break;
    }
    case JEACH_ID: {
      sqlite3_result_int64(ctx, (sqlite3_int64)p->i + (p->eType==JSON_OBJECT));
      break;