https://github.com/yawaramin/gen_json_string
Utility to generate fake JSON data from a JSON Schema
https://github.com/yawaramin/gen_json_string
json json-schema ocaml
Last synced: 2 months ago
JSON representation
Utility to generate fake JSON data from a JSON Schema
- Host: GitHub
- URL: https://github.com/yawaramin/gen_json_string
- Owner: yawaramin
- License: gpl-3.0
- Created: 2021-04-04T20:17:56.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-05T04:44:04.000Z (about 5 years ago)
- Last Synced: 2025-02-19T23:52:22.367Z (over 1 year ago)
- Topics: json, json-schema, ocaml
- Language: OCaml
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## gen_json_string
OCaml CLI tool to generate random JSON value given a JSON Schema as
input. Currently supports a very small subset of JSON Schema.
Ref. https://json-schema.org/understanding-json-schema/reference/index.html
### License
GNU GPL v3 or later.
### Setup
Ensure that you have the dependencies listed in `dune-project`.
### Build
Run:
dune build gen_json_string.exe
### Test
Run:
dune exec ./gen_json_string.exe <<<'{"type": "object", "required": ["name", "age"], "properties": {"name": {"type": "string"}, "age": {"type": "integer"}, "likes": {"type": "array", "items": {"type": "string"}}}}'