kiwi_json.cr
Kiwi::JSON
Save and load typed objects from Kiwi stores.
Kiwi::JSON
delegates another Kiwi::Store
and provides an interface to use Kiwi stores with classes with JSON.mapping
.
Installation
Add this to your application's shard.yml
:
dependencies:
kiwi_json:
github: Schniz/kiwi_json.cr
Usage
require "kiwi_json"
user = Person.from_json(...)
some_store = Kiwi::MemoryStore.new
json_store = Kiwi::JSON(Person).new(some_store)
json_store["user"] = user
json_store["user"] # => serialized <User:...>
Contributing
- Fork it ( https://github.com/Schniz/kiwi_json.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- Schniz Gal Schlezinger - creator, maintainer
Repository
kiwi_json.cr
Owner
Statistic
- 1
- 0
- 0
- 0
- 2
- about 7 years ago
- October 21, 2017
License
MIT License
Links
Synced at
Mon, 18 Nov 2024 03:34:53 GMT
Languages