Y
Hacker News
new
|
ask
|
show
|
jobs
by
tuxychandru
4362 days ago
JSON parser does return an error on empty string.
http://play.golang.org/p/DE0soRRRBp
2 comments
flaie
4362 days ago
If you use a `Decoder` instead you can check for the `io.EOF` error in that case.
http://play.golang.org/p/cbWe9se76d
link
skj
4362 days ago
Bam!
link
http://play.golang.org/p/cbWe9se76d