Fix manual source code to follow the schema definition

This commit is contained in:
itchyny authored and Nico Williams committed 2023-07-22 19:00:16 -05:00
1 parent 9044f540bb
commit 34629ed223
5 files changed
+108 -125

No files matched your search

+11 -11
View File
@@ -162,7 +162,7 @@ sections:
examples:
- program: '.foo'
input: '{"foo": 42, "bar": "less interesting data"}'
output: [42]
output: ['42']
- program: '.foo'
input: '{"notfoo": true, "alsonotfoo": false}'
output: ['null']
@@ -438,8 +438,8 @@ sections:
examples:
- program: '10 / . * 3'
input: 5
output: [6]
input: '5'
output: ['6']
- title: '`length`'
body: |
@@ -460,7 +460,7 @@ sections:
examples:
- program: '.[] | length'
input: '[[1,2], "string", {"a":2}, null]'
output: [2, 6, 1, 0]
output: ['2', '6', '1', '0']
- title: '`keys`'
body: |
@@ -554,7 +554,7 @@ sections:
examples:
- program: '1, empty, 2'
input: 'null'
output: [1, 2]
output: ['1', '2']
- program: '[1,2,empty,3]'
input: 'null'
output: ['[1,2,3]']
@@ -591,7 +591,7 @@ sections:
output: ['"abc"']
- program: add
input: '[1, 2, 3]'
output: [6]
output: ['6']
- program: add
input: '[]'
output: ["null"]
@@ -622,7 +622,7 @@ sections:
examples:
- program: '.[] | tonumber'
input: '[1, "1"]'
output: [1, 1]
output: ['1', '1']
- title: '`tostring`'
body: |
@@ -925,7 +925,7 @@ sections:
else
"many"
end
input: 2
input: '2'
output: ['"many"']
- title: "`>`, `>=`, `<=`, `<`"
@@ -940,7 +940,7 @@ sections:
examples:
- program: '. < 5'
input: 2
input: '2'
output: ['true']
- title: "`and`, `or`, `not`"
@@ -996,10 +996,10 @@ sections:
examples:
- program: '.foo // 42'
input: '{"foo": 19}'
output: [19]
output: ['19']
- program: '.foo // 42'
input: '{}'
output: [42]
output: ['42']
- title: Advanced features
body: |