# JS Serializer

[![NPM version](https://img.shields.io/npm/v/jsserializer.svg)](https://www.npmjs.org/package/jsserializer )
[![Build Status](https://img.shields.io/travis/jsserializers/jsserializer/master.svg)](http://travis-ci.org/jsserializers/jsserializer "Check this project's build status on TravisCI")
[![Coverage Status](https://img.shields.io/coveralls/jsserializers/jsserializer/master.svg)](https://coveralls.io/r/jsserializers/jsserializer?branch=master)

A library that can serialize or deserialize objects using an adapter.

## Example

```js
// import an adapter
import yaml from 'jsserializer-yaml';
// import this library
import serializer from 'jsserializer';
// load in the adapter
let service = serializer(yaml);

// provide the serializer options
let options = {};

// serialize
let obj = service.parse('test: 123', options);
let str = service.stringify(obj, options);
```

## Install

### [NPM](http://npmjs.org/)
- Install: `npm install --save jsserializer`
- Use: `require('jsserializer')`

### JsSerializerAdapter API

```js
parse(source: String, options: Object): Object

stringify(source: Object, options: String): String

parseAsync(source: String, options: Object): Thenable<Object>

stringifyAsync(source: Object, options: String): Thenable<String>

parseFile(filename: String, source: String, options: Object): Object

stringifyToFile(filename: String, source: Object, options: String): String
```

### JsSerializer API

Implemeted by all serializers.

```js
get extensions(): String

parse(source: String, options: Object): Object

stringify(source: Object, options: String): 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.
