Merge pull request #2887 from urbit/m/smaller-safer-json

chat: virtualize message-to-json only where needed
This commit is contained in:
Fang 2020-05-20 18:18:50 +02:00 committed by GitHub
commit 8d787cf486
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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