Jump to content

JSON: Difference between revisions

64 bytes added ,  1 year ago
→‎{{header|Tailspin}}: Update to stricter typing
No edit summary
(→‎{{header|Tailspin}}: Update to stricter typing)
Line 4,184:
when <{}> do
[ $... ] -> '{$(1) -> printKeyValue;$(2..last)... -> ', $ -> printKeyValue;';}' !
when <..0|0..> do
'$;'!
when <'.*'> do
[ $... -> encodeChars ] -> '"$...;"' !
otherwise 'WTF!' !
Line 4,196:
 
{ blue: [1,2], ocean: 'water' } -> printJson -> '$;
' -> !OUT::write
 
'plain string
' -> printJson -> '$;
' -> !OUT::write
</lang>
Line 4,202 ⟶ 4,206:
apples
{"blue": [1, 2], "ocean": "water"}
"plain string\n"
</pre>
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.