I think you left out the important info of "why" right here. :)
JSON is not well-suited to transporting or storing binary data. We
have protocol buffers in the tree and they might be a better fit for
your task.
> The problem I'm having is this:
> http://codesearch.google.com/#OAMlx_jo-ck/src/base/json/json_writer.cc&exact_package=chromium&l=186
> Binary value types can't be serialized to JSON in our current
> implementation. I was thinking of computing the 64 byte digest of the binary
> data and using that as the serialized value. Obviously, you wouldn't be able
> to deserialize the value back to the original binary data.
> Any thoughts or "No! Don't do that"s?
> Thanks,
> Eric
>
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
>
Cheers,
Jói
I wonder what the developer console does in this circumstance?
Here's one way to look at it: you can convert arbitrary JSON into a
Value and back, but you can't convert an arbitrary Value into JSON and
back. Values are a superset of JSON objects.
Cheers,
Jói