Skip to content

Commit

Permalink
Update json-converter-keyword-handling-rfc.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ajduberstein committed Nov 11, 2019
1 parent f5057fb commit 3c59eed
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dev-docs/RFCs/vNext/json-converter-keyword-handling-rfc.md
Expand Up @@ -18,10 +18,12 @@ Users may want `type` to be interpreted as one or the other but currently can't

The GeoJSON standard includes type in the top-level JSON, so most GeoJSON data sets break when ingested by the deck.gl/json API.

## Proposal
## Prior Art

We should likely avoid conflicting with [JSON pointer syntax](https://www.baeldung.com/json-pointer) and JSON Paths. It seems like `_`, `__`, and `@@` would be acceptable characters. We are already using `__` in deck.gl to represent internal fields, so it seems like the least ambiguity comes from use of `@@`.

Suggestions from @ibgreen
## Proposal

Use `__type` to indicate the Javascript `type` keyword.
deck.gl/json will use `@@type` to indicate the Javascript `type` keyword.

Additionally, add a syntax for expressions, e.g, `@=` prefix: `@=[lng, lat]`, so that we didn't need to know any information about prop types to deduce which strings to parse as expressions.
Additionally, add a syntax for expressions, e.g, `@@=` prefix: `@@=[lng, lat]`, so that we didn't need to know any information about prop types to deduce which strings to parse as expressions.

0 comments on commit 3c59eed

Please sign in to comment.