JSPM

jsonapi-deserializer-es

0.2.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q37321F
  • License MIT

JSON API-Compliant Deserializer

Package Exports

  • jsonapi-deserializer-es

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jsonapi-deserializer-es) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

JSON API Deserializer

This package presents a simple and fast function to deserialize JSON API documents to simple javascript objects. The implementation is a synchronous (but efficient) alternative to Seyz/jsonapi-serializer's deserializer.

Install

npm install jsonapi-deserializer --save

Usage

var jsonapiDocument = { /* ... */ };

// Node
var deserialize = require('jsonapi-deserializer').deserialize;
var simpleObj = deserialize(jsonapiDocument);

// ES6 - Typescript
import { deserialize } from 'jsonapi-deserializer';
let simpleObj = deserialize(jsonapiDocument);

Run tests

Get the repo (git clone), install dependencies (npm install) and run the default test suite (npm test). There's not many tests since they're being developed as necessary. Open a new issue if you find incorrect/undesired behavior.