Skip to content

Main content

Feature Foreign Member Count Tool

Count top-level names outside a supplied GeoJSON member set; not a complete Feature validator.

Loading tool…

Description

Parse any plain JSON object and count own keys absent from the supplied member-name vocabulary.

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 any plain JSON object and count own keys absent from the supplied member-name vocabulary.

When to use this tool

Use Feature Foreign Member Count when you need a literal GeoJSON metadata, identifier, or shallow-key operation.

How to use the tool and how it works

  1. Enter featureJson, suppliedMemberNames. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read foreignMemberCount. Use the output convention below.

Parse any plain JSON object and count own keys absent from the supplied member-name vocabulary.1

Input fieldMeaning and unitsAccepted input
featureJsonFeature JsonRequired. Text; maximum UTF-16 length 8192.
suppliedMemberNamesSupplied Member NamesRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
Output fieldInterpretationReturned shape
foreignMemberCountForeign Member CountRequired. Safe integer.
json
{
  "input": {
    "featureJson": "{\"type\":\"Feature\",\"geometry\":null,\"properties\":{},\"vendor\":5}",
    "suppliedMemberNames": [
      "type",
      "geometry",
      "properties",
      "id",
      "bbox"
    ]
  },
  "output": {
    "foreignMemberCount": 1
  }
}

Limitations and assumptions

  • The object need not be a Feature. The supplied vocabulary determines what counts as foreign, so this is not an independent canonical GeoJSON member-policy check.
  • 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

  1. Calculation and input contract: geojson/feature-foreign-member-count — tool.io

Similar or alternative tools