jsonbinpack
Version:
A space-efficient schema-driven binary JSON serialization format based on JSON Schema
53 lines (52 loc) • 1.37 kB
JSON
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [ "dt", "coord", "weather", "alerts" ],
"properties": {
"dt": {
"type": "integer",
"minimum": 0
},
"coord": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": { "type": "number" }
},
"weather": {
"type": "object",
"additionalProperties": false,
"required": [ "temp", "wind_speed", "wind_deg", "dew_point" ],
"properties": {
"temp": { "type": "number" },
"wind_speed": { "type": "number" },
"wind_deg": {
"type": "integer",
"minimum": 0
},
"precipitation_intensity": { "type": "number" },
"dew_point": { "type": "number" }
}
},
"alerts": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [ "sender_name", "event", "event_level" ],
"properties": {
"sender_name": { "type": "string" },
"event": { "type": "string" },
"event_level": {
"type": "integer",
"minimum": 0
}
}
}
}
}
}
}