mapping
- Explore
- View source
- Playground
Loading ....
- YAML
- JSON
ethdebug/format/type/complex/mapping
$schema: "https://json-schema.org/draft/2020-12/schema"
$id: "schema:ethdebug/format/type/complex/mapping"
title: ethdebug/format/type/complex/mapping
description: |
Schema for representing mapping types.
Standard interpretation: each entry's value is read as the `value` type,
and its key as the `key` type. This type does not define how a key selects
its entry's bytes.
type: object
properties:
label:
$ref: "schema:ethdebug/format/type/base#/$defs/Label"
class:
type: string
const: complex
kind:
type: string
const: mapping
contains:
type: object
title: Mapping key/value types
properties:
key:
$ref: "schema:ethdebug/format/type/wrapper"
value:
$ref: "schema:ethdebug/format/type/wrapper"
required:
- key
- value
required:
- kind
- contains
examples:
- kind: mapping
contains:
key:
type:
kind: address
value:
type:
kind: number
ethdebug/format/type/complex/mapping
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "schema:ethdebug/format/type/complex/mapping",
"title": "ethdebug/format/type/complex/mapping",
"description": "Schema for representing mapping types.\n\nStandard interpretation: each entry's value is read as the `value` type,\nand its key as the `key` type. This type does not define how a key selects\nits entry's bytes.\n",
"type": "object",
"properties": {
"label": {
"$ref": "schema:ethdebug/format/type/base#/$defs/Label"
},
"class": {
"type": "string",
"const": "complex"
},
"kind": {
"type": "string",
"const": "mapping"
},
"contains": {
"type": "object",
"title": "Mapping key/value types",
"properties": {
"key": {
"$ref": "schema:ethdebug/format/type/wrapper"
},
"value": {
"$ref": "schema:ethdebug/format/type/wrapper"
}
},
"required": [
"key",
"value"
]
}
},
"required": [
"kind",
"contains"
],
"examples": [
{
"kind": "mapping",
"contains": {
"key": {
"type": {
"kind": "address"
}
},
"value": {
"type": {
"kind": "number"
}
}
}
}
]
}
Loading playground...