Description
Parse a properties object, check own-key presence, and test whether that value is a boolean.
Feature properties and foreign members are JSON metadata, distinct from the geometry coordinates. Exact key operations and ID type checks can preserve useful distinctions, but do not independently authenticate records or validate an entire Feature.
Parse a properties object, check own-key presence, and test whether that value is a boolean.
When to use this tool
Use Feature Property Boolean Type Guard when you need a literal GeoJSON metadata, identifier, or shallow-key operation.
How to use the tool and how it works
- Enter propertiesJson, key. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read present, boolean, value. Inspect present, boolean, value before interpreting the associated values.
Parse a properties object, check own-key presence, and test whether that value is a boolean. Return its boolean value only when correctly typed; otherwise return false as the value placeholder.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| propertiesJson | Properties Json | Required. Text; maximum UTF-16 length 8192. |
| key | Key | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| present | Present | Required. Boolean. |
| boolean | Boolean | Required. Boolean. |
| value | Boolean property value when correctly typed, otherwise false placeholder; inspect present and boolean. | Required. Boolean. |
{
"input": {
"propertiesJson": "{\"open\":false}",
"key": "open"
},
"output": {
"present": true,
"boolean": true,
"value": false
}
} Limitations and assumptions
- Read the presence and boolean flags together. The false placeholder cannot distinguish an actual false value from absence or a wrong type on its own.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Validate the complete Feature and its intended data model after editing. Preserve identifier precision and distinguish null values, absent members, collisions, and nested properties explicitly.
References
Similar or alternative tools
- Feature Property Empty State
Parse propertiesJson as null or a plain object.
- Feature Property JSON Null Replacement
Parse a properties object, record whether key exists as an own member, remove its old entry if present, and append the key with JSON null before serializing.