Skip to content

opporancisis/flatjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flatjson

A simple command that flattens input json.

How to run

$ cat test.json | go run main.go

Flattening algorithm

Consider the following input object:

{
    "a": 1,
    "b": true,
    "c": {
        "d": 3,
        "e": "test"
    }
}

In this example the path to the terminal value 1 is "a" and the path to the terminal value 3 is "c.d".

The program will output the flattened version:

{
    "a": 1,
    "b": true,
    "c.d": 3,
    "c.e": "test"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages