shrub/tree/json.hook
2015-07-16 16:07:50 -07:00

51 lines
985 B
Plaintext

::
/? 314
/= gas /$ fuel
/= ral /: /=== /% /react-json/
/= pal /: /===
/; |= a=(map ,@ta json) a
/% 2
/_ /react-json/
::
/= sal /: /===
/; |= a=(map ,@ta json) a
/% 2
/_ /react-snips-json/
::
::::
::
// /%%/util
::
[util=. +>]
::
!:
::::
::
^- json
=+ ~(. util gas)
:: .json?kids
?: (~(has by qix.gas) %kids)
%+ joba %kids
=. pal (~(del by pal) %md) :: XX haxor
=- [%a (turn (~(tap by pal)) -)]
|= [a=span b=json]
%- jobe :~
name/s/a
body/b
==
:: .json?snip
?: (~(has by qix.gas) %snip)
%+ joba %snip
=. sal (~(del by sal) %md) :: XX haxor
=- [%a (turn (~(tap by sal)) -)]
|= [a=span b=json]
%- jobe :~
name/s/a
body/b
==
:: .json
%- jobe :~
kids/[%a (turn get-kids |=(a=span s/a))]
body/ral
==