Small improvement for json PrettyEncoder