Merge pull request #2879 from urbit/m/safer-json

chat: virtualize message-to-json conversion
This commit is contained in:
Fang 2020-05-08 22:40:55 +02:00 committed by GitHub
commit 00e1ba4d93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,9 +41,16 @@
(fall ((ot output+(ar dank) ~) a) ~) (fall ((ot output+(ar dank) ~) a) ~)
:: ::
++ lett ++ lett
=, enjs:format
|= =letter |= =letter
^- json ^- json
=, enjs:format =; result=(each json tang)
?- -.result
%& p.result
%| (frond %text s+'[[json rendering error]]')
==
%- mule
|.
?- -.letter ?- -.letter
%text %text
(frond %text s+text.letter) (frond %text s+text.letter)