thedevsaddam / gojsonq

A simple Go package to Query over JSON/YAML/XML/CSV Data
https://github.com/thedevsaddam/gojsonq/wiki
MIT License
2.18k stars 140 forks source link

json reflect type err #49

Closed hyahm closed 5 years ago

hyahm commented 5 years ago
{
    "employees": [{
            "firstName": "John",
            "lastName": "Doe"
        },
        {
            "firstName": "Anna",
            "lastName": "Smith"
        },
        {
            "firstName": "Peter",
            "lastName": "Jones"
        }
    ],
    "name": {
        "first": "Tom",
        "last": "Hanks"
    },
    "age": 61.9,
    "high": 175,
    "iswoman": true,
    "sgggg": "ajsdfjlj",
    "nick": {
        "first": "Tom",
        "last": "Hanks"
    }
}
JJ := gojsonq.New().JSONString(n).Get()
if reflect.ValueOf(v).Kind() == reflect.Float64 {
                //jsonstruct[k] = v
                //unmarshal(v)
                base = true
                jsonstruct[k] = v
            }

get this high type is float64

only support map,slice,float64,string,bool ?

thedevsaddam commented 5 years ago

I'm not sure what is your question, if you are confused about the decoding then check this link

hyahm commented 5 years ago

encoding/json package only suport these types