toJSON and toJSONMixin