Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/adaxi/flat
- Owner: adaxi
- License: mit
- Created: 2016-05-24T10:42:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-06-08T09:24:09.000Z (over 8 years ago)
- Last Synced: 2024-05-01T13:35:55.119Z (8 months ago)
- Topics: java, json
- Language: Java
- Size: 104 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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).