One of our development partners have asked if there is a way we could specify an interface version within our JSON Schema definition. There isn't a "$version"
key so is there a recognised "standard" that we ought to follow (I can't use $id as we are using $ref
's elsewhere so the document won't validate any more). We are on Draft-6 so $comment
isn't available per-se.
Validation-wise XML Spy is quite happy for me to add a "version"
key to the top level, so I could just do that but if there is there a more usual approach I'd rather do that.
JSON Schema is an IETF standard providing a format for what JSON data is required for a given application and how to interact with it. Applying such standards for a JSON document lets you enforce consistency and data validity across similar JSON data.
If you want to use a custom schema of your own that's part of your project, just click on your schema in Solution Explorer and then drag it to that dropdown list. Alternatively, you can use the $schema keyword in a JSON file to associate it with a schema.
JSON-B does not have a versioning API but it has actually some versioning capabilities.
In JSON, the “keys” must always be strings. Each of these pairs is conventionally referred to as a “property”. In Python, "objects" are analogous to the dict type. An important difference, however, is that while Python dictionaries may use anything hashable as a key, in JSON all the keys must be strings.
Snowplow's SchemaVer semantic versioning for schemas is an option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With