NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
What do you really mean by 'binary data'? (Score:1)
and http://json.org/ [json.org] says "A string is a collection of zero or more Unicode characters, wrapped in double quotes, using backslash escapes. [...]. A string is very much like a C or Java string."
Does that mean JSON "doesn't have native support for binary data"? Depends on your needs I guess (and whether you control the sending and/or receiving ends).
If you have a series of bytes that you want to get from A to B via JSON I'd assume you could treat them as a series of unicode code points, for the sake of encoding. If the destination is JavaScript then they'll end up as a series of 16-bit unicode code points internally, but that shouldn't matter as all the code points are 256. Basically think in terms of the logical "sequence of integers that happen to be 256" rather than the physical "sequence of adjacent 8 bit bytes".
My experience with JSON & JavaScript is minimal (currently) and I've not actually needed to do this yet, but I may do soon so I'm keen for someone to point out any flaws in my thinking.
Reply to This
Re: (Score:1)