[go-nuts] json objects
how to unmarshal more than one json object .. Here is the code data, err := ioutil.ReadFile("file.txt") checkError(err) x:=string(data) fmt.Println(x) var b1 book err1:=json.Unmarshal(data,&b1) fmt.Printf("Books : %+v", b1) checkError(err1) if b1.ID==ID
[go-nuts] json objects
package main import "encoding/json" import "log" import "fmt" type book struct { IDint title string pubDate string authorstring genre string publisher string language string } func main(){ b := book{ ID:1, title: "Standard", pubD