UNPKG

jsonbinpack

Version:

A space-efficient schema-driven binary JSON serialization format based on JSON Schema

313 lines (312 loc) 8.16 kB
{ "type": "object", "encoding": "REQUIRED_ONLY_BOUNDED_TYPED_OBJECT", "options": { "propertyEncodings": { "coord": { "type": "object", "encoding": "REQUIRED_ONLY_BOUNDED_TYPED_OBJECT", "options": { "propertyEncodings": { "lon": { "type": "number", "encoding": "DOUBLE_VARINT_TUPLE", "options": {} }, "lat": { "type": "number", "encoding": "DOUBLE_VARINT_TUPLE", "options": {} } }, "requiredProperties": [ "lat", "lon" ], "booleanRequiredProperties": [] } }, "weather": { "type": "array", "encoding": "FLOOR_TYPED_LENGTH_PREFIX", "options": { "minimum": 0, "encoding": { "type": "object", "encoding": "REQUIRED_ONLY_BOUNDED_TYPED_OBJECT", "options": { "propertyEncodings": { "id": { "type": "integer", "encoding": "FLOOR_MULTIPLE_ENUM_VARINT", "options": { "minimum": 0, "multiplier": 1 } }, "main": { "type": "string", "encoding": "FLOOR_PREFIX_LENGTH_ENUM_VARINT", "options": { "minimum": 0 } }, "description": { "type": "string", "encoding": "FLOOR_PREFIX_LENGTH_ENUM_VARINT", "options": { "minimum": 0 } }, "icon": { "type": "string", "encoding": "FLOOR_PREFIX_LENGTH_ENUM_VARINT", "options": { "minimum": 0 } } }, "requiredProperties": [ "description", "icon", "id", "main" ], "booleanRequiredProperties": [] } }, "prefixEncodings": [] } }, "base": { "type": "string", "encoding": "FLOOR_PREFIX_LENGTH_ENUM_VARINT", "options": { "minimum": 0 } }, "main": { "type": "object", "encoding": "REQUIRED_ONLY_BOUNDED_TYPED_OBJECT", "options": { "propertyEncodings": { "temp": { "type": "number", "encoding": "DOUBLE_VARINT_TUPLE", "options": {} }, "feels_like": { "type": "number", "encoding": "DOUBLE_VARINT_TUPLE", "options": {} }, "temp_min": { "type": "number", "encoding": "DOUBLE_VARINT_TUPLE", "options": {} }, "temp_max": { "type": "number", "encoding": "DOUBLE_VARINT_TUPLE", "options": {} }, "pressure": { "type": "integer", "encoding": "FLOOR_MULTIPLE_ENUM_VARINT", "options": { "minimum": 0, "multiplier": 1 } }, "humidity": { "type": "integer", "encoding": "FLOOR_MULTIPLE_ENUM_VARINT", "options": { "minimum": 0, "multiplier": 1 } } }, "requiredProperties": [ "feels_like", "humidity", "pressure", "temp", "temp_max", "temp_min" ], "booleanRequiredProperties": [] } }, "visibility": { "type": "integer", "encoding": "FLOOR_MULTIPLE_ENUM_VARINT", "options": { "minimum": 0, "multiplier": 1 } }, "wind": { "type": "object", "encoding": "REQUIRED_ONLY_BOUNDED_TYPED_OBJECT", "options": { "propertyEncodings": { "speed": { "type": "number", "encoding": "DOUBLE_VARINT_TUPLE", "options": {} }, "deg": { "type": "integer", "encoding": "FLOOR_MULTIPLE_ENUM_VARINT", "options": { "minimum": 0, "multiplier": 1 } } }, "requiredProperties": [ "deg", "speed" ], "booleanRequiredProperties": [] } }, "clouds": { "type": "object", "encoding": "REQUIRED_ONLY_BOUNDED_TYPED_OBJECT", "options": { "propertyEncodings": { "all": { "type": "integer", "encoding": "FLOOR_MULTIPLE_ENUM_VARINT", "options": { "minimum": 0, "multiplier": 1 } } }, "requiredProperties": [ "all" ], "booleanRequiredProperties": [] } }, "dt": { "type": "integer", "encoding": "FLOOR_MULTIPLE_ENUM_VARINT", "options": { "minimum": 0, "multiplier": 1 } }, "sys": { "type": "object", "encoding": "REQUIRED_ONLY_BOUNDED_TYPED_OBJECT", "options": { "propertyEncodings": { "type": { "type": "integer", "encoding": "FLOOR_MULTIPLE_ENUM_VARINT", "options": { "minimum": 0, "multiplier": 1 } }, "id": { "type": "integer", "encoding": "FLOOR_MULTIPLE_ENUM_VARINT", "options": { "minimum": 0, "multiplier": 1 } }, "message": { "type": "number", "encoding": "DOUBLE_VARINT_TUPLE", "options": {} }, "country": { "type": "string", "encoding": "FLOOR_PREFIX_LENGTH_ENUM_VARINT", "options": { "minimum": 0 } }, "sunrise": { "type": "integer", "encoding": "FLOOR_MULTIPLE_ENUM_VARINT", "options": { "minimum": 0, "multiplier": 1 } }, "sunset": { "type": "integer", "encoding": "FLOOR_MULTIPLE_ENUM_VARINT", "options": { "minimum": 0, "multiplier": 1 } } }, "requiredProperties": [ "country", "id", "message", "sunrise", "sunset", "type" ], "booleanRequiredProperties": [] } }, "timezone": { "type": "integer", "encoding": "ARBITRARY_MULTIPLE_ZIGZAG_VARINT", "options": { "multiplier": 1 } }, "id": { "type": "integer", "encoding": "FLOOR_MULTIPLE_ENUM_VARINT", "options": { "minimum": 0, "multiplier": 1 } }, "name": { "type": "string", "encoding": "FLOOR_PREFIX_LENGTH_ENUM_VARINT", "options": { "minimum": 0 } }, "cod": { "type": "integer", "encoding": "FLOOR_MULTIPLE_ENUM_VARINT", "options": { "minimum": 0, "multiplier": 1 } } }, "requiredProperties": [ "base", "clouds", "cod", "coord", "dt", "id", "main", "name", "sys", "timezone", "visibility", "weather", "wind" ], "booleanRequiredProperties": [] } }