Registry / serialization / jsonapi-deserializable

jsonapi-deserializable

JSON →
library0.2.0rbrubygemsunverified

DSL for deserializing incoming JSON API payloads into custom hashes.

gem install jsonapi-deserializable
INSTALL
IMPORT
SIG · JSONAPI-DESERIALIZ
J
jsonapi-deserializable
serializationrubyv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

JSONAPI::Deserializable
require 'jsonapi/deserializable'

Deserialize a JSON API document into a hash

require 'jsonapi/deserializable' deserializer = Class.new(JSONAPI::Deserializable::Resource) do type { |type| { type: type } } id { |id| { id: id } } attribute(:title) { |val| { title: val } } end payload = { data: { type: 'articles', id: '1', attributes: { title: 'Hello' } } } result = deserializer.call(payload) puts result.inspect
Debug
Known issues
breakingRequires Ruby >= 2.0
fix
Upgrade Ruby to version 2.0 or later
affects: < 0.2.0
Upgrade
Version history
0.2.0latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
jsonapi-deserializable — gem install jsonapi-deserializable · libregistry