Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/adaxi/flat

Flatten JSON objects
https://github.com/adaxi/flat

java json

Last synced: about 2 months ago
JSON representation

Flatten JSON objects

Awesome Lists containing this project

README

        

Flat
====

[![Build Status](https://travis-ci.org/adaxi/Flat.svg?branch=master)](https://travis-ci.org/adaxi/Flat) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/6076ee95c7314c9d8ffab07e490c0555)](https://www.codacy.com/app/dev_25/Flat?utm_source=github.com&utm_medium=referral&utm_content=adaxi/Flat&utm_campaign=Badge_Grade) [![Coverage Status](https://coveralls.io/repos/github/adaxi/Flat/badge.svg?branch=master)](https://coveralls.io/github/adaxi/Flat?branch=master) [![Coverage Status](https://maven-badges.herokuapp.com/maven-central/be.adaxisoft/Flat/badge.svg)](http://adaxi.github.io/Flat/dependency-info.html)

This library flattens JSON files.

Before:

```json
{
"key1": {
"keyA": "valueI"
},
"key2": {
"keyB": "valueII"
},
"key3": { "a": { "b": { "c": 2 } } }
}
```

After:

```json
{
"key1.keyA": "valueI",
"key2.keyB": "valueII",
"key3.a.b.c": 2
}
```

The library can do the reverse operation as well: unflatten.

Use the library
---------------

The [documentation page](http://adaxi.github.io/Flat/dependency-info.html) lists how you can add this library
as a dependency of your project.

Credit
------

Based on the work of [Jeffrey Blattman](https://zerocredibility.wordpress.com/tag/flatten/).
Created to be compatible with [NPM flat](https://www.npmjs.com/package/flat).