Description
Optionally remove top-level null entries from a JSON properties object.
GeoJSON separates a Feature’s identifier, geometry and properties. Null geometry, an explicit null property and an omitted property are distinct states. Coordinate-order labels do not transform positions, and stringifying a value already entered as a number cannot restore lost identifier precision or spelling.
Optionally remove top-level null entries from a JSON properties object.
When to use this tool
Use Feature Property Null Removal Choice when checking the stated restricted GeoJSON construction, property or identifier convention.
How to use the tool and how it works
- Enter propertiesJson, removeNulls. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read propertiesJson, removedNames. Use the output convention below.
Parse propertiesJson as a portable JSON object, rejecting null, arrays and invalid/nonportable values. If removeNulls=true, remove only top-level members with null values; serialize remaining members and return removedNames.1
GeoJSON properties can contain JSON values, including null. Removing top-level null entries is a caller choice rather than a requirement of the format.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| propertiesJson | Properties Json | Required. Text; maximum UTF-16 length 8192. |
| removeNulls | Remove Nulls | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| propertiesJson | Properties Json | Required. Text; maximum UTF-16 length 8192. |
| removedNames | Top-level explicit-null member names removed under the selected policy; nested nulls stay. | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
{
"input": {
"propertiesJson": "{\"a\":null,\"b\":2}",
"removeNulls": true
},
"output": {
"propertiesJson": "{\"b\":2}",
"removedNames": [
"a"
]
}
} Limitations and assumptions
- Nested nulls remain, and null differs from an absent property; no whole Feature, schema semantics or data completeness is validated.
- 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 against the intended GeoJSON contract and use verified longitude/latitude and datum conventions for actual geographic data exchange.
References
Similar or alternative tools
- Feature Null Property Preservation
Construct a null-geometry GeoJSON Feature with an explicit null property or its omission.
- Feature Property Empty State Tool
Classify an explicit GeoJSON properties value as null, empty object or nonempty object without conflating absence.