<commit_before># Serializr

[![Join the chat at https://gitter.im/mobxjs/serializr](https://badges.gitter.im/mobxjs/serializr.svg)](https://gitter.im/mobxjs/serializr?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

__Don't use this package yet, it is under development_


[![Build Status](https://travis-ci.org/mobxjs/serializr.svg?branch=master)](https://travis-ci.org/mobxjs/serializr)
[![Coverage Status](https://coveralls.io/repos/mobxjs/serializr/badge.svg?branch=master&service=github)](https://coveralls.io/github/mobxjs/serializr?branch=master)
[![Join the chat at https://gitter.im/mobxjs/serializr](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mobxjs/serializr?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)


-------
# TODO

 * [ ] If MobX, use createTransformer, transaction
 * [x] coverage, travis
 * [ ] Typings
 * [ ] Docs
 * [ ] Test in Babel
 * [ ] Test in Typescript

-------

# Api

## ModelSchema

The driving concept behind (de)serialization is a ModelSchema.
The configuration for how to (de)serialize plain JS structures to objects.
See also the examples below

A model schema simple looks like this:

```javascript
const todoSchema = {
    factory: (context) => new Todo(),
    extends: ModelSchema,
    props: {
        modelfield: PropSchema 
    }
}<commit_msg>Fixed badgets<commit_after># Serializr


__Don't use this package yet, it is under development_


[![Build Status](https://travis-ci.org/mobxjs/serializr.svg?branch=master)](https://travis-ci.org/mobxjs/serializr)
[![Coverage Status](https://coveralls.io/repos/github/mobxjs/serializr/badge.svg?branch=master)](https://coveralls.io/github/mobxjs/serializr?branch=master)
[![Join the chat at https://gitter.im/mobxjs/serializr](https://badges.gitter.im/mobxjs/serializr.svg)](https://gitter.im/mobxjs/serializr?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

-------
# TODO

 * [ ] If MobX, use createTransformer, transaction
 * [x] coverage, travis
 * [ ] Typings
 * [ ] Docs
 * [ ] Test in Babel
 * [ ] Test in Typescript

-------

# Api

## ModelSchema

The driving concept behind (de)serialization is a ModelSchema.
The configuration for how to (de)serialize plain JS structures to objects.
See also the examples below

A model schema simple looks like this:

```javascript
const todoSchema = {
    factory: (context) => new Todo(),
    extends: ModelSchema,
    props: {
        modelfield: PropSchema 
    }
}
{'fraction_non_alphanumeric': 0.14828137490007995, 'fraction_numerical': 0.0007993605115907274, 'mean_word_length': 4.562222222222222, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 17, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3966865', 'n_tokens_mistral': 893, 'n_tokens_neox': 870, 'n_words': 170}