Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/syeopite/cryyjson
Simple crystal bindings to yyjson https://github.com/ibireme/yyjson
https://github.com/syeopite/cryyjson
bindings c-bindings crystal json json-parser yyjson
Last synced: 20 days ago
JSON representation
Simple crystal bindings to yyjson https://github.com/ibireme/yyjson
- Host: GitHub
- URL: https://github.com/syeopite/cryyjson
- Owner: syeopite
- License: mit
- Created: 2024-07-05T21:58:00.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-07-05T22:19:11.000Z (4 months ago)
- Last Synced: 2024-10-04T21:31:46.682Z (about 1 month ago)
- Topics: bindings, c-bindings, crystal, json, json-parser, yyjson
- Language: Crystal
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cryyjson
Simple crystal bindings to [yyjson](https://github.com/ibireme/yyjson)
Only parsing is supported for now.
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
cryyjson:
github: syeopite/cryyjson
```2. Run `shards install`
**Note: You must have cmake installed in order to build yyjson via the postinstall script**
## Usage
```crystal
require "cryyjson"data = File.read("example_data.json").gets_to_end
json = Cryyjson.parse(data)# API is the exact same as stdlib
typeof(json) # => JSON::Anyjson["key"] # => value
```## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request## Credits
- [@ibireme](https://github.com/ibireme) - creator of [yyjson](https://github.com/ibireme/yyjson)