Yarn

Recent twts in reply to #wq3v67a

#golang
A handy and powerful library to deal with unstructured data

The below piece of code shows an example of usage

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

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 … ⌘ Read more

⤋ Read More

Participate

Login to join in on this yarn.