go - How to unmarshal json in golang when left part is a number -
I want to open such a Jason in code. But does this code work any suggestions? Thox!
PS playground here
Package main import "encoding / Jason" import "FMT" type response structure {page int forest string "1"} function main ( ) {In: = [] byte (`{" "page": 1, "1": "this is 1"}) res: = & amp; Answer {json.Unmarshal (in, & amp;; res) fmt.println (res)}
Type Response Structure {page int: Jason: "Page" `A string 'json:" 1 " }} Live
Comments
Post a Comment