On Thu, Sep 6, 2012 at 7:13 PM, penduin <
owen...@gmail.com> wrote:
> I would think that a "blob" in any conventional sense would lead to invalid
> JSON, let alone anything validate-able against a schema... But for cases
> where we need to embed data, perhaps some sort of recognition of
> base64-encoded data (or UU, or anything) might be a handy thing for
> json-schema to recognize.
>
> What might work is a simple "string" type with a "format": "blob" which you
> define, though you'd have to add your own validation for your own format
> types.
>
> Maybe we should suggest the inclusion of "format": "base64" (or something)
> in the spec? Any blob can be encoded into a string which could be
> "verified" in as much as it is decode-able. That doesn't help if you need
> to examine the contents of the blob, but it would tell you that the data
> _is_ one.
>
> Does that help at all, or have I completely misunderstood what you're after?
>
Eh, I don't know whether this is a coindidence, but...
https://github.com/fge/json-schema-formats/commit/0ad95c5de933acececed2d7074d62a45019055c3
Like you, I believe that what the linked page calls a blob is a Base64
representation of the content but I didn't bother (because that's the
word, really, when it comes to W3C specs) reading further to
understand the anatomy of such a blob.
The commit above is but a hypothetical format attribute (the spec
allows for adding attributes, I take advantage of that), but I
genuinely think this one can be made a full-blown part of the
specification.
Cheers,
--
Francis Galiegue,
fgal...@gmail.com
JSON Schema:
https://github.com/json-schema