shrub/base/tree/json.hook
2015-06-05 13:32:29 -07:00

51 lines
987 B
Plaintext

::
/? 314
/= gas /$ fuel
/= ral /: /=== /% /react-js/
/= pal /: /===
/; |= a=(map ,@ta cord) a
/% 2
/_ /react-js/
::
/= sal /: /===
/; |= a=(map ,@ta json) a
/% 2
/_ /react-snip-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=cord]
%- jobe :~
name/s/a
body/s/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/[%s ral]
==