Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukewilliamboswell/roc-json
Json package for Roc
https://github.com/lukewilliamboswell/roc-json
roc-lang
Last synced: 8 days ago
JSON representation
Json package for Roc
- Host: GitHub
- URL: https://github.com/lukewilliamboswell/roc-json
- Owner: lukewilliamboswell
- License: upl-1.0
- Created: 2023-05-31T06:55:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-20T08:38:35.000Z (3 months ago)
- Last Synced: 2024-08-20T10:38:30.252Z (3 months ago)
- Topics: roc-lang
- Language: Roc
- Homepage: https://lukewilliamboswell.github.io/roc-json/
- Size: 96.7 KB
- Stars: 20
- Watchers: 2
- Forks: 13
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- roc-awesome - lukewilliamboswell/roc-json
README
# Json Package for Roc 🤘
:warning: On linux `--linker=legacy` is necessary for this package because of [this roc issue](https://github.com/roc-lang/roc/issues/3609)
## Example
```sh
$ roc run examples/simple1.roc --linker=legacy
Successfully decoded image, title:"View from 15th Floor"
```## Documentation
See [https://lukewilliamboswell.github.io/roc-json/](https://lukewilliamboswell.github.io/roc-json/)
Alternatively, generate docs locally using `roc docs package/main.roc` and then serve the html files.
## Package URL Release
You can use the release URL package in your Roc app. In your `app.roc` file you can import the json package like so.
```roc
app [example] {
cli: platform "https://github.com/roc-lang/basic-cli/releases/download/[REPLACE WITH RELEASE URL].tar.br",
json: "https://github.com/lukewilliamboswell/roc-json/releases/download/[REPLACE WITH RELEASE URL].tar.br",
}
...
```