Last active
April 29, 2016 08:15
-
-
Save takedajs/a23f264a9115bb99dec78575c3b0bb90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
type Hoge struct { | |
$ string | |
} | |
func main() { | |
var jsonStr = `{ | |
"$": "hoge", | |
}` | |
var h Hoge | |
err := json.Unmarshal([]byte(jsonStr), &h) | |
if err != nil { | |
panic(err) | |
} | |
fmt.Println(h) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment