26 lines
525 B
JSON
26 lines
525 B
JSON
{
|
|
"expression": [
|
|
"match",
|
|
["boolean", ["get", "x"]],
|
|
true,
|
|
"match",
|
|
"otherwise"
|
|
],
|
|
"inputs": [
|
|
[{}, {"properties": {"x": true}}],
|
|
[{}, {"properties": {"x": false}}],
|
|
[{}, {"properties": {"x": "true"}}],
|
|
[{}, {"properties": {"x": 1}}],
|
|
[{}, {"properties": {"x": null}}],
|
|
[{}, {"properties": {}}]
|
|
],
|
|
"expected": {
|
|
"compiled": {
|
|
"result": "error",
|
|
"errors": [
|
|
{"key": "[2]", "error": "Branch labels must be numbers or strings."}
|
|
]
|
|
}
|
|
}
|
|
}
|