Skip to content

Commit

Permalink
more json docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Nov 29, 2024
1 parent 8623df8 commit 3c9dba5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions parser/src/json/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

This sub-module converts JSON schema to llguidance grammar.

It aims to either produce a grammar conformat to the JSON schema semantics, or give an error,
but [see below](#departures-from-json-schema-semantics) for some known differences.

## Supported JSON schema features

Following JSON schema features are supported.
Expand All @@ -15,6 +18,7 @@ Core features:
- `const`
- `enum`
- `type` - both single type and array of types
- sibling properties - when schema has keywords in addition to `anyOf`, `allOf`, `$ref`, the result is intersection

Array features:

Expand Down Expand Up @@ -42,3 +46,7 @@ Number features (for both integer and number):
- `maximum`
- `exclusiveMinimum`
- `exclusiveMaximum`

## Departures from JSON schema semantics

- order of properties in `properties` is fixed to the order in schema (`required` can be used to skip some of them)

0 comments on commit 3c9dba5

Please sign in to comment.