https://github.com/pixelbyaj/jsonapi
serialize & dserialize json api
https://github.com/pixelbyaj/jsonapi
Last synced: 3 months ago
JSON representation
serialize & dserialize json api
- Host: GitHub
- URL: https://github.com/pixelbyaj/jsonapi
- Owner: pixelbyaj
- License: mit
- Created: 2019-12-25T11:35:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-19T10:45:07.000Z (over 4 years ago)
- Last Synced: 2025-02-17T15:50:52.869Z (3 months ago)
- Language: TypeScript
- Size: 38.1 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Typescript based JSONAPI Serialize & Deserialize library
Serialize & Dserialize JSON API[](https://www.npmjs.com/package/@pixelbyaj/jsonapi)
[](https://github.com/pixelbyaj/jsonapi/blob/master/LICENSE)
## Installation
```console
npm i jsonapi-parser --save
yarn add jsonapi-parser
bower install jsonapi-parser --save
```
## Usage
### TypeScript
```typescript
import { JSONAPI } from '@pixelbyaj/jsonapi';
let jsonapi = new JSONAPI(JSON_API_OBJECT);
jsonapi.serialize().then(x=>{
console.log(JSON.stringify(x));
jsonapi.deserialize(x).then(y=>{
console.log(JSON.stringify(y));
})
});
})
```