Skip to content
This repository was archived by the owner on Oct 18, 2021. It is now read-only.

Rough draft #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ If JSONPath `p` is selector `s` followed by JSONPath `t`, then for all JSON valu
```
Question: do we need to use something like quasi quotes to clarify the above?

## dot child
## selectors

The following sections describe primitive selectors which can be strung together to form a JSONPath.
### dot child
If `o` is a JSON object which does not have key `k`, then:
```
<o>.k = <>
Expand All @@ -52,12 +55,12 @@ and:
<o ∪ {k:v}>.k = <v>
```

## union
### union
```
<a>[u, v] = (<a>[u]) ^ (<a>[v])
```

## bracket child
### bracket child
If `o` is a JSON object which does not have key `k` (for certain forms of k...), then:
```
<o>[k] = <>
Expand All @@ -67,7 +70,7 @@ and:
<o ∪ {k:v}>[k] = <v>
```

## array slice
### array slice
If `a` is an array, then:
```
... details! ...
Expand All @@ -78,7 +81,7 @@ If `a` is not an array and `sl` is a slice expression, then:
<a>[sl] = <>
```

## recursive descent
### recursive descent
If `z` is a scalar:
```
<z>.. = <z>
Expand Down