# json2pojo

[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Downloads][downloads-image]][downloads-url]
[![Circle CI](https://circleci.com/gh/entertainyou/json2pojo.svg?style=svg)](https://circleci.com/gh/entertainyou/json2pojo)

JSON to POJO with duplicate key handling, uses jsonschema2pojo(http://jsonschema2pojo.org/) to do the schema to POJO code generation.

Install:

    npm install -g json2pojo

Usage:

    json2pojo json_directory args_to_jsonschema2pojo
    
For generate POJO from the following json:

    # test
    {
      "foo": {
        "dup": {"value": 10},
      },
      "dup": {"value": 20},
    }

Generated POJO:

    Foo.java Dup.java Test.java

[npm-image]: https://img.shields.io/npm/v/json2pojo.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/json2pojo
[travis-image]: https://travis-ci.org/entertainyou/json2pojo.png
[travis-url]: https://travis-ci.org/entertainyou/json2pojo
[downloads-image]: https://img.shields.io/npm/dm/json2pojo.svg?style=flat-square
[downloads-url]: https://www.npmjs.com/package/json2pojo
