Skip to content

Update guidance on use with non-JSON formats #1390

Closed
@awwright

Description

@awwright

The extent to which JSON Schema can be used to validate data structured as a non-JSON input isn't defined well enough. The spec currently says

However, any document or memory structure that can be parsed into or processed according to the JSON Schema data model can be interpreted against a JSON Schema, including data formats like CBOR

In my personal opinion, this is an interesting fact to point out. However, this isn't enough guidance to ensure that different implementations are compatible. Additionally, is somewhat outside the scope of JSON Schema, and so should be removed.

If this should be written into the standard, it should go into more detail about how this works technically. For any JSON-compatible format, there should be an isomorphism to JSON, or there should be guidance on how to handle the larger value space (for example, CBOR provides data tags, which applications might like to distinguish).

But I think the best option is to remove this for now, and publish guidance on handling non-JSON inputs separately.

Closes #1274

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions