https://github.com/adaxi/flat
Flatten JSON objects
https://github.com/adaxi/flat
java json
Last synced: 3 months ago
JSON representation
Flatten JSON objects
- Host: GitHub
- URL: https://github.com/adaxi/flat
- Owner: adaxi
- License: mit
- Created: 2016-05-24T10:42:49.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-08T09:24:09.000Z (about 10 years ago)
- Last Synced: 2025-01-14T00:34:48.285Z (over 1 year ago)
- Topics: java, json
- Language: Java
- Size: 104 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Flat
====
[](https://travis-ci.org/adaxi/Flat) [](https://www.codacy.com/app/dev_25/Flat?utm_source=github.com&utm_medium=referral&utm_content=adaxi/Flat&utm_campaign=Badge_Grade) [](https://coveralls.io/github/adaxi/Flat?branch=master) [](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).