https://github.com/zth/rescript-json-schema-embed
https://github.com/zth/rescript-json-schema-embed
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/zth/rescript-json-schema-embed
- Owner: zth
- Created: 2024-06-20T18:23:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-21T18:06:29.000Z (over 1 year ago)
- Last Synced: 2025-10-19T02:24:51.561Z (4 months ago)
- Language: ReScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```rescript
open RescriptSchema
module TestSchema = %generated.jsonSchema("./testschema.json")
let data = %raw(`{
"Id": 1,
"Title": "My first film",
"Age": 17
}`)
switch data->S.parseWith(TestSchema.schema) {
| Ok(content) => Console.log(content)
| Error(err) => Console.error(err)
}
```