marshmallow icon indicating copy to clipboard operation
marshmallow copied to clipboard

Support any types that has UnmarshalJSON/MarshalJSON method

Open knoguchi opened this issue 1 year ago • 3 comments

I wonder if you could support non-primitive types such as time.Time just like the standard json.Unmarshal json.Marshal does. I only need it when such types implemented UnmarshalJSON/MarshalJSON methods.

knoguchi avatar Oct 11 '22 03:10 knoguchi

Sure! This is already supported. Any type implementing custom JSON unmarshaler will be respected as you expect. Example

Let us know if it works for you, or you need anything else 🙏

avivpxi avatar Oct 11 '22 06:10 avivpxi

@knoguchi making sure you've seen this one before I'm closing the issue

avivpxi avatar Oct 15 '22 08:10 avivpxi

Thank you. I have one example that I can't figure out. I will post it shortly.

knoguchi avatar Oct 16 '22 04:10 knoguchi

@knoguchi any news here?

avivpxi avatar Nov 03 '22 08:11 avivpxi

Closing due to no response

avivpxi avatar Jan 27 '23 07:01 avivpxi