Validating JSON Messages with JSON-Schema
Validating JSON Messages
with JSON-Schema
Interop North Spring - Shanghai 14 19 May 2017 - Laurent MICHEL
1
Use Case: SVOM: a GRB Monitor
French Ground Segment
Pipeline (Python)
REST
{json}
Pipeline (Java)
¡ñ
Heterogeneous system
¡ð Multiple Agents
¡ð Multiple institutes
¡ð Multiple languages
REST
Pipeline (Go)
{json}
{json}
REST
{json}
¡ñ
Continuous integration
¡ð JSON messages
must be tested
against specified
schemes
Interop North Spring - Shanghai 14 19 May 2017 - Laurent MICHEL
Database (C)
REST
2
JSON Schema Home Page
Useful for the VO?
Screenshot
Interop North Spring - Shanghai 14 19 May 2017 - Laurent MICHEL
3
What is a JSON Schema
¡ñ A JSON schema is a JSON object
¡ð
¡ð
¡ð
JSON-schema components are also JSON-schemes
Controlled vocabulary
Compliant with a meta-schema
¡ñ Can be interpreted by a processor to validate
message contents
¡ð
¡ð
Simple type validation
Complex type validation
Schema
Valid
Not valid
{}
Any JSON entity
nothing
{ "type": "string" }
¡°This is a string¡±
45
{ ¡°key¡±, ¡°this is a string¡±}
Interop North Spring - Shanghai 14 19 May 2017 - Laurent MICHEL
4
Typical Schema Structure
{
¡ñ
"definitions": {
"address": {
"type": "object",
"properties": {
"street_address": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
}
},
"required": [
"street_address",
"city",
"state"
]
}
},
Dictionary of definitions
¡ð Components
"type": "object",
¡ñ
"properties": {
"billing_address": {
"$ref": "#/definitions/address"
},
"shipping_address": {
"$ref": "#/definitions/address"
Root object structure
¡ð Object or array
}
Interop North Spring - Shanghai 14 19 May 2017 - Laurent MICHEL
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- json schema enumeration example
- json schema object type example
- enum json schema example
- json schema enum from document
- json and graph model university of helsinki
- typescript definition from json schema
- full stack course content greens technologys
- 11 advance mobile and web application development using
- validating json messages with json schema
- create json schema from typescript interface
Related searches
- xsd to json schema converter online
- xsd to json schema online
- create json schema from json
- json schema generator free
- create json schema from sample
- json to json schema converter online
- convert json schema to xsd
- create json schema online
- json to json schema tool
- generate json schema online
- json schema to json generator
- json schema to json data