Skip to content

Instantly share code, notes, and snippets.

@takedajs takedajs/$_json_parse.go
Last active Apr 29, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.