Some cleanup & ordering in /lib/talk-json
::> 3. lists and sets become arrays. maps become objects.
::> 4. stringify cells only when/in a way such that it benefits the majority of
::> foreseen usecases.
+::> x. avoid dashes in json names.
+::> x. for {$empty $~} fronds, use (frond 'empty' b+&).
+::> x. for {$frond abc/(unit *)}, use (frond 'frond' (frond 'abc' (mabe abc)))
::>
::> q: should parsing be strict or forgiving? ie, accept "ship" and/or "~ship"?
::
^- json
?~(a ~ (b u.a))
::
+ ::> ||
+ ::> || %query-models
+ ::> ||
+ ::> models relating to queries, their results and updates.
+ ::+|
::
++ pire ::> prize-reader
|= a/prize-reader
$nick (dini +.a)
==
::
+ ++ pack ::> package
+ |= a/package
+ ^- json
+ %- pairs :~
+ nes+a+(turn nes.a enve) ::TODO maybe map
+ cos+(loby cos.a)
+ pes+(crow pes.a)
+ ==
+ ::
++ digy ::> diff-glyph
|= a/diff-glyph
^- json
$true (frond %tru (mabe tru.a trun))
==
::
- ++ pack ::> package
- |= a/package
- ^- json
- %- pairs :~
- nes+a+(turn nes.a enve) ::TODO maybe map
- cos+(loby cos.a)
- pes+(crow pes.a)
- ==
+ ::> ||
+ ::> || %circles
+ ::> ||
+ ::> messaging targets and their metadata
+ ::+|
::
++ circ ::> circle
|= a/circle
rem+(mo rem.a tmp grop)
==
::
- ++ tmp
- |= a/circle
- ^- @t
- (crip (circ:en-tape a))
- ::
++ grop ::> group
|= a/group
^- json
^- json
(pairs fir+s+fir.a mid+(mabe mid.a cord) las+s+las.a ~)
::
+ ::> ||
+ ::> || %message-data
+ ::> ||
+ ::> structures for containing main message data
+ ::+|
+ ::
++ enve ::> envelope
|= a/envelope
^- json
|= a/telegram
^- json
%- pairs :~
- ::aut+ship
+ aut+(ship aut.a)
::TODO can we avoid this code duplication somehow?
uid+s+(scot %uv uid.a)
aud+(audi aud.a)
$tank a+(turn +.a dank)
==
::
+ ::> ||
+ ::> || %message-metadata
+ ::> ||
+ ::> structures for containing message metadata
+ ::+|
+ ::
++ audi ::> audience
|= a/audience
^- json
rose+(ot style+(ot mid+sa open+sa close+sa ~) lines+(ar dank) ~)
==
::
+ ::> ||
+ ::> || %query-models
+ ::> ||
+ ::> models relating to queries, their results and updates.
+ ::+|
::
++ pire ::> prize-reader
^- $-(json (unit prize-reader))
