[READ-ONLY] Mirror of https://github.com/Schniz/kiwi_json.cr. Save and load typed objects from Kiwi stores
0

Configure Feed

Select the types of activity you want to include in your feed.

Crystal 100.0%
6 1 0

Clone this repository

https://tangled.org/schlez.in/kiwi_json.cr https://tangled.org/did:plc:wnigzqhxlpvygc36gmli3fig
git@tangled.org:schlez.in/kiwi_json.cr git@tangled.org:did:plc:wnigzqhxlpvygc36gmli3fig

For self-hosted knots, clone URLs may differ based on your setup.



README.md

Kiwi::JSON build status#

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#

  1. Fork it ( https://github.com/Schniz/kiwi_json.cr/fork )
  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

Contributors#

  • Schniz Gal Schlezinger - creator, maintainer