v0.1.0 28f9d6e

tojson.json RawHistoryFolder

1{
2  "basics": [
3    {
4      "expr": "tojson(null)",
5      "result": {
6        "kind": "String",
7        "value": "null"
8      }
9    },
10    {
11      "expr": "tojson(true)",
12      "result": {
13        "kind": "String",
14        "value": "true"
15      }
16    },
17    {
18      "expr": "tojson(false)",
19      "result": {
20        "kind": "String",
21        "value": "false"
22      }
23    },
24    {
25      "expr": "tojson(0)",
26      "result": {
27        "kind": "String",
28        "value": "0"
29      }
30    },
31    {
32      "expr": "tojson(-0)",
33      "result": {
34        "kind": "String",
35        "value": "0"
36      }
37    },
38    {
39      "expr": "tojson(123456789)",
40      "result": {
41        "kind": "String",
42        "value": "123456789"
43      }
44    },
45    {
46      "expr": "tojson(-123456789)",
47      "result": {
48        "kind": "String",
49        "value": "-123456789"
50      }
51    },
52    {
53      "expr": "tojson(1234.5)",
54      "result": {
55        "kind": "String",
56        "value": "1234.5"
57      }
58    },
59    {
60      "expr": "tojson(-1234.5)",
61      "result": {
62        "kind": "String",
63        "value": "-1234.5"
64      }
65    },
66    {
67      "expr": "tojson('')",
68      "result": {
69        "kind": "String",
70        "value": "\"\""
71      }
72    },
73    {
74      "expr": "tojson('abc')",
75      "result": {
76        "kind": "String",
77        "value": "\"abc\""
78      }
79    },
80    {
81      "expr": "tojson('abc''def')",
82      "result": {
83        "kind": "String",
84        "value": "\"abc'def\""
85      }
86    },
87    {
88      "expr": "tojson('abc\\\"def')",
89      "result": {
90        "kind": "String",
91        "value": "\"abc\\\\\\\"def\""
92      }
93    },
94    {
95      "expr": "tojson(emptyArray)",
96      "contexts": {
97        "emptyArray": []
98      },
99      "result": {
100        "kind": "String",
101        "value": "[]"
102      }
103    },
104    {
105      "expr": "tojson(emptyObject)",
106      "contexts": {
107        "emptyObject": {}
108      },
109      "result": {
110        "kind": "String",
111        "value": "{}"
112      }
113    }
114  ],
115  "arrays": [
116    {
117      "expr": "tojson(myArray)",
118      "contexts": {
119        "myArray": []
120      },
121      "result": {
122        "kind": "String",
123        "value": "[]"
124      }
125    },
126    {
127      "expr": "tojson(myArray)",
128      "contexts": {
129        "myArray": [
130          1,
131          2,
132          3
133        ]
134      },
135      "result": {
136        "kind": "String",
137        "value": "[\n  1,\n  2,\n  3\n]"
138      }
139    },
140    {
141      "expr": "tojson(myArray)",
142      "contexts": {
143        "myArray": [
144          [
145            1,
146            2,
147            3
148          ],
149          [
150            "abc",
151            "def",
152            "ghi"
153          ],
154          [
155            true,
156            false,
157            null,
158            [],
159            {}
160          ]
161        ]
162      },
163      "result": {
164        "kind": "String",
165        "value": "[\n  [\n    1,\n    2,\n    3\n  ],\n  [\n    \"abc\",\n    \"def\",\n    \"ghi\"\n  ],\n  [\n    true,\n    false,\n    null,\n    [],\n    {}\n  ]\n]"
166      }
167    }
168  ],
169  "object": [
170    {
171      "expr": "tojson(myObject)",
172      "contexts": {
173        "myObject": {}
174      },
175      "result": {
176        "kind": "String",
177        "value": "{}"
178      }
179    },
180    {
181      "expr": "tojson(myObject)",
182      "contexts": {
183        "myObject": {
184          "one": "value one",
185          "two" : "value two",
186          "three": "value three"
187        }
188      },
189      "result": {
190        "kind": "String",
191        "value": "{\n  \"one\": \"value one\",\n  \"two\": \"value two\",\n  \"three\": \"value three\"\n}"
192      }
193    },
194    {
195      "expr": "tojson(myObject)",
196      "contexts": {
197        "myObject": {
198          "nested-one": {
199            "one": 1,
200            "two": 2,
201            "three": 3
202          },
203          "nested-two": {
204            "string one": "value one",
205            "string two": "value two",
206            "string three": "value three"
207          },
208          "nested-three": {
209            "true": true,
210            "false": false,
211            "null": null,
212            "array": [],
213            "object": {}
214          }
215        }
216      },
217      "result": {
218        "kind": "String",
219        "value": "{\n  \"nested-one\": {\n    \"one\": 1,\n    \"two\": 2,\n    \"three\": 3\n  },\n  \"nested-two\": {\n    \"string one\": \"value one\",\n    \"string two\": \"value two\",\n    \"string three\": \"value three\"\n  },\n  \"nested-three\": {\n    \"true\": true,\n    \"false\": false,\n    \"null\": null,\n    \"array\": [],\n    \"object\": {}\n  }\n}"
220      }
221    }
222  ]
223}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 3

↑↓ moveenter openesc close