Re: [Json] BOMs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bjoern Hoehrmann scripsit:

> Is there any chance, by the way, to change `JSON.stringify` so it does
> not output strings that cannot be encoded using UTF-8? Specifically,
> 
>   JSON.stringify(JSON.parse("\"\uD800\""))
> 
> would need to escape the surrogate instead of emitting it literally.

No, there isn't.  We've been down this road repeatedly.  People can and
do use JSON strings to encode arbitrary sequences of unsigned 16-bit integers.

-- 
You let them out again, Old Man Willow!                 John Cowan
What you be a-thinking of?  You should not be waking!   cowan@xxxxxxxx
Eat earth!  Dig deep!  Drink water!  Go to sleep!
Bombadil is talking.                                    http://ccil.org/~cowan




[Index of Archives]     [IETF Annoucements]     [IETF]     [IP Storage]     [Yosemite News]     [Linux SCTP]     [Linux Newbies]     [Fedora Users]