--- title: json --- JSON is built on the following data structures: object: ``` json { "key1": "value1", "key2": "value2" } ``` array: ``` json [ "first", "second", "third" ] ``` number: ``` json 42 3.1415926 ``` string: ``` json "This is a string" ``` boolean: ``` json true false ``` null: ``` json null ``` python equivalents ------------------ | JSON | Python | | ------- | --------- | | string | string | | number | int/float | | object | dict | | array | list | | boolean | bool | | null | None | keywords -------- | type | compatible keywords | | ------- | ----------------------------------------------------------------------------------------------------------------------- | | string | type, minLength, maxLength, pattern | | number | type, minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf | | integer | type, minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf | | boolean | type | | null | type | | array | type, minItems, maxItems, items, uniqueItems | | object | type, properties, additionalProperties, required, minProperties, maxProperties, dependencies, patternProperties, regexp |