Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

jsserializer-json5

jsserializers6MIT1.0.0-alpha.1
jsserializer, jsserializer-plugin

readme

jsserializer-json5

NPM version Build Status Coverage Status

A jsserializer adapter for JSON5

Example

// import the adapter
import json5 from 'jsserializer-json5';
// import this library
import serializer from 'jsserializer';
// load in the adapter
let service = serializer(json5);
// provide the serializer options
let options = {};
// serialize
let obj = service.parse('{test: 123}', options);
let str = service.stringify(obj, options);

Install

NPM

  • Install: npm install --save jsserializer
  • Install: npm install --save jsserializer-json5

API

Property type params Description
extensions getter string[]
parse function (source: string, options: Object)
stringify function (source: Object, options: string)

License

Copyright (c) 2016 https://github.com/orgs/jsserializers/people. All rights reserved.

Licensed under the MIT License. See LICENSE in the project root for license information.