diff options
Diffstat (limited to 'desk/mar/json.hoon')
-rw-r--r-- | desk/mar/json.hoon | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/desk/mar/json.hoon b/desk/mar/json.hoon new file mode 100644 index 0000000..7d6fcbf --- /dev/null +++ b/desk/mar/json.hoon @@ -0,0 +1,26 @@ +:: +:::: /hoon/json/mar + :: +/? 310 + :: +:::: compute + :: +=, eyre +=, format +=, html +|_ jon=^json +:: +++ grow :: convert to + |% + ++ mime [/application/json (as-octs:mimes -:txt)] :: convert to %mime + ++ txt [(en:json jon)]~ + -- +++ grab + |% :: convert from + ++ mime |=([p=mite q=octs] (fall (de:json (@t q.q)) *^json)) + ++ noun ^json :: clam from %noun + ++ numb numb:enjs + ++ time time:enjs + -- +++ grad %mime +-- |