1

github.com godoc.org goreportcard.com posted by IVAN CORRALES SOLERA 424 days ago  

A handy and powerful library to deal with unstructured data

The below piece of code shows an example of usage


type Person struct {
Firstname string `structs:"firstname"`
Age int `structs:"age"`
Siblings []Person `structs:"siblings,omitempty"`
}

func main(){
k := knoa.Map().Set("firstname", "John", "age", 20)
k.Set("siblings", []Person{
{
Firstname: "Tim",
Age: 29,
},
{
Firstname: "Bob",
Age: 40,
},
})

k.Set("age", 23, "siblings[1].age", 39)

var person Person
k.To(&person)
}

I am working hard to provide a ready-for-production release, but any feedback or suggestion will be appreciated in the meantime!
Register to comment or vote on this story