From https://github.com/astaxie/gopkg/blob/master/encoding/json/Encode.md