fork of indigo with slightly nicer lexgen
at main 1.7 kB view raw
1[ 2 { 3 "note": "top-level not an object", 4 "json": "blah" 5 }, 6 { 7 "note": "float", 8 "json": { 9 "rcrd": { 10 "$type": "com.example.blah", 11 "a": 123.456, 12 "b": "blah" 13 } 14 } 15 }, 16 { 17 "note": "record with $type null", 18 "json": { 19 "rcrd": { 20 "$type": null, 21 "a": 123, 22 "b": "blah" 23 } 24 } 25 }, 26 { 27 "note": "record with $type wrong type", 28 "json": { 29 "rcrd": { 30 "$type": 123, 31 "a": 123, 32 "b": "blah" 33 } 34 } 35 }, 36 { 37 "note": "record with empty $type string", 38 "json": { 39 "rcrd": { 40 "$type": "", 41 "a": 123, 42 "b": "blah" 43 } 44 } 45 }, 46 { 47 "note": "blob with string size", 48 "json": { 49 "blb": { 50 "$type": "blob", 51 "ref": { 52 "$link": "bafkreiccldh766hwcnuxnf2wh6jgzepf2nlu2lvcllt63eww5p6chi4ity" 53 }, 54 "mimeType": "image/jpeg", 55 "size": "10000" 56 } 57 } 58 }, 59 { 60 "note": "blob with missing key", 61 "json": { 62 "blb": { 63 "$type": "blob", 64 "mimeType": "image/jpeg", 65 "size": 10000 66 } 67 } 68 }, 69 { 70 "note": "bytes with wrong field type", 71 "json": { 72 "lnk": { 73 "$bytes": [1,2,3] 74 } 75 } 76 }, 77 { 78 "note": "bytes with extra fields", 79 "json": { 80 "lnk": { 81 "$bytes": "nFERjvLLiw9qm45JrqH9QTzyC2Lu1Xb4ne6+sBrCzI0", 82 "other": "blah" 83 } 84 } 85 }, 86 { 87 "note": "link with wrong field type", 88 "json": { 89 "lnk": { 90 "$link": 1234 91 } 92 } 93 }, 94 { 95 "note": "link with bogus CID", 96 "json": { 97 "lnk": { 98 "$link": "." 99 } 100 } 101 }, 102 { 103 "note": "link with extra fields", 104 "json": { 105 "lnk": { 106 "$link": "bafkreiccldh766hwcnuxnf2wh6jgzepf2nlu2lvcllt63eww5p6chi4ity", 107 "other": "blah" 108 } 109 } 110 } 111]