blob: 66e468befd47f71b08923dd27e627d410fd825cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# mp
Parsing and repl in awk.
## Representation of JSON in awk
Rely on multi-dimensional sparse arrays. In fine this is just
an array of strings indexed by strings.
The JSON types are: true, false,
Key elements:
- t: true type
- f: false type
- n: null type
- s: string type
- d: number type
- a: array type
- o: object type
- k: key (object only)
- v: value (array and object)
- t: type (one of t, f, n, s, d, a, o)
- [0-9]+: index of key or value
## I/O
Use string encoded, line oriented protocols. Each command or response fits on a
single line. Newlines in string values must be escaped. Use an optional session
id at begin of command and response to allow to multiplex several peer sessions
on the same stream.
- Command:
[number] command_name args...
- Response:
[number] data ...
|