mirror of
https://github.com/urbit/shrub.git
synced 2024-11-29 14:57:12 +03:00
Merge pull request #2887 from urbit/m/smaller-safer-json
chat: virtualize message-to-json only where needed
This commit is contained in:
commit
8d787cf486
@ -13,6 +13,9 @@
|
||||
?- -.letter
|
||||
%text
|
||||
(frond %text s+text.letter)
|
||||
::
|
||||
%me
|
||||
(frond %me s+narrative.letter)
|
||||
::
|
||||
%url
|
||||
(frond %url s+url.letter)
|
||||
@ -20,13 +23,17 @@
|
||||
%code
|
||||
%+ frond %code
|
||||
%- pairs
|
||||
:~ [%expression s+expression.letter]
|
||||
[%output a+(turn output.letter tank)]
|
||||
:- [%expression s+expression.letter]
|
||||
:_ ~
|
||||
:- %output
|
||||
:: virtualize output rendering, +tank:enjs:format might crash
|
||||
::
|
||||
=/ result=(each (list json) tang)
|
||||
(mule |.((turn output.letter tank)))
|
||||
?- -.result
|
||||
%& a+p.result
|
||||
%| a+[a+[%s '[[output rendering error]]']~]~
|
||||
==
|
||||
::
|
||||
%me
|
||||
(frond %me s+narrative.letter)
|
||||
::
|
||||
==
|
||||
::
|
||||
++ envelope
|
||||
|
Loading…
Reference in New Issue
Block a user