thanks very much.

在 2014年2月3日星期一 UTC+8下午4:48:18,Qiang Han写道:
>
> package main
>
> import "fmt"
> import "time"
> import "encoding/json"
>
> type Foo struct {
> Bar time.Time
> }
>
> func main() {
> msg := "{\"bar\":\"2012-01-02T16:10:22Z07:00\"}"
> var f Foo
> err := json.Unmarshal([]byte(msg), &f)
> if err != nil {
> fmt.Printf("%+v", err)
> } else {
> fmt.Println(f)
> }
> }
>
> output: parsing time ""2006-01-02T15:04:05Z07:00"" as 
> ""2006-01-02T15:04:05Z07:00"": cannot parse "07:00"" as """
>
> http://play.golang.org/p/mO38T1N5vn
>
> Not sure what string are allowed after "Z"
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to