Go's json marshal

Posted on: 11 September, 2018
By Sab

When marshalling, if the variable reference is nil then json lib encodes it as nil. But for an empty slice the preferrence is to have [].