diff options
| author | Marc Vertes <mvertes@free.fr> | 2025-07-14 16:40:09 +0200 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2025-07-14 16:40:09 +0200 |
| commit | da2a57d9209f36c5439c1051a97f2af4a5faa0dc (patch) | |
| tree | 1f94393168351d06d4cdde56ee96e2b5193d0034 /readme.md | |
| parent | a1bd922ef46440a2bf99d7ee4e44749e10d9e66d (diff) | |
parse an scan work in stream mode
Diffstat (limited to 'readme.md')
| -rw-r--r-- | readme.md | 35 |
1 files changed, 34 insertions, 1 deletions
@@ -1,3 +1,36 @@ # mp -parsing and repl in awk. +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 +- n: 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, n, a, o) +- l: length (number of array values, or object key-value pairs). +- [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 ... |
