Nested JSON struct

Refer Go Playground - The Go Programming Language

Output
2009/11/10 23:00:00 {
“Name”: “AccountInfo”,
“PolicyID”: “1”,
“UpdatedTime”: “Tue, 10 Nov 2009 23:00:00 UTC”,
“Elements”: {
“Salutation”: “Mr.”,
“FullName”: “Mak”
}
}

why am I getting timestamp at root ?
how can I get it replaced by string constant such as “root”?

Please some of your code, in particular, struct definition and printing process.

Replace:

log.Println(string(pageJson2))

to:

fmt.Println(string(pageJson2))`

The log package adds the date/time format.

1 Like

Can your post your codes here? otherwise we can not locate the issue?