added support for json.Marshaler interface