Code Monkey home page Code Monkey logo

jsonconsul's People

Contributors

abhiyerra avatar obradovic avatar parkr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsonconsul's Issues

Allow the usage of a server other than localhost

I'd like the ability to connect to a consul server other than localhost, it seems that consul.go will only use the default configuration options:

func init() {
        var (
                err error
        )

        client, err = api.NewClient(api.DefaultConfig())
        if err != nil {
                log.Fatalln(err)
        }
        kv = client.KV()
}

List Handing

I have below json
{
"Month": {
"Name": "January"
},
"Week":{
"Day": [ "Monday", "Tuesday", "Wednesday" ]
}
}

I would like to import above json using command , currently it is considering "Week/Day" as key and value is "[ "Monday", "Tuesday", "Wednesday" ]". but actually key should be like

Week/Day[0] = "Monday"
Week/Day[1] = "Tuesday"
Week/Day[2] = "Wednesday"

Did you handled if json contains list ? Is there any plan to implement

export generates valid but not well-formatted json

like this, many empty key value pair in output json

{
    "users": {
        "15d99242e9f7235d220d": {
            "": "",
            "id": "15d99242e9f7235d220d"
        },
        "166e8c2e5ca2eaa67376": {
            "": "",
            "id": "166e8c2e5ca2eaa67376"
        },
        "99d3bd56485b8f3893cf": {
            "": "",
            "id": "99d3bd56485b8f3893cf"
        }
    }
}

Consul vs Json Diff

Be able to see the diffs between what is in consul and what a json file are.

error when exporting

Downloaded a release and tried to run ./jsonconsul export -json-values -prefix="helios"

panic: interface conversion: interface is string, not map[string]interface {}

goroutine 1 [running]:
github.com/vsco/jsonconsul.consulToNestedMap(0x0, 0x0, 0xc20804a101, 0xc20803cae0, 0x0, 0x0)
    /Users/abhi/Dropbox/projects/gostuff/src/github.com/vsco/jsonconsul/consul.go:64 +0x747
github.com/vsco/jsonconsul.(*JsonExport).GenerateJson(0xc2080440f0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/abhi/Dropbox/projects/gostuff/src/github.com/vsco/jsonconsul/export.go:107 +0x8d
github.com/vsco/jsonconsul.(*JsonExport).Run(0xc2080440f0, 0x0, 0x0)
    /Users/abhi/Dropbox/projects/gostuff/src/github.com/vsco/jsonconsul/export.go:128 +0x4b
main.main()
    /Users/abhi/Dropbox/projects/gostuff/src/github.com/vsco/jsonconsul/cmd/main.go:42 +0x1b0

goroutine 7 [runnable]:
net/http.(*persistConn).readLoop(0xc20806e0b0)
    /Users/abhi/vsco/tools/vendor/go/1.4.2/src/net/http/transport.go:928 +0x9ce
created by net/http.(*Transport).dialConn
    /Users/abhi/vsco/tools/vendor/go/1.4.2/src/net/http/transport.go:660 +0xc9f

goroutine 8 [select]:
net/http.(*persistConn).writeLoop(0xc20806e0b0)
    /Users/abhi/vsco/tools/vendor/go/1.4.2/src/net/http/transport.go:945 +0x41d
created by net/http.(*Transport).dialConn
    /Users/abhi/vsco/tools/vendor/go/1.4.2/src/net/http/transport.go:661 +0xcbc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.