2013-12-28から1日間の記事一覧

Go言語でjsonのパースエラー

以前codeevalのjsonのパースをするというchallengeをgoでやってみたとき、以下のようなエラーがでた。 json: cannot unmarshal null into Go value of type main.Item 簡略化してるけどコードは以下の通り。 package main import ( "encoding/json" "log" ) …