-
Notifications
You must be signed in to change notification settings - Fork 15
Update Logs
Anderson Lu edited this page May 30, 2019
·
5 revisions
Tagv1.3 is released !
Add following functions for v1.3
ValStr() (bool, string)
ValInt64() (bool, int64)
ValInt32() (bool, int32)
ValInt16() (bool, int16)
ValInt() (bool, int)
ValFloat32() (bool,float32)
ValFloat32N(int) (bool,float32)
ValFloat64() (bool,float64)
ValFloat64N(int) (bool,float64)
ValBool() (bool,bool)
Tag v1.0 is released !
Add ValueFloat64N(spec int)
and ValueFloat32N(spec int)
method.
func Demo() {
fsion := gofasion.NewFasion(`{value:1.23456}`)
f64 := fsion.Get("value").Float64() //result is 1.23456
f64N := fsion.Get("value").Float64N(3) //result is 1.235
fmt.Println(f64,f64N)
}
Gofasion is a lightweight parsing library that facilitates the parsing of interface JSON data during development. Its biggest feature is to support chained calls, which means that the target key name and key value can be directly obtained without pre-defining the structure of the data. More details