trampster / JsonSrcGen

Json library that uses .NET 5 Source Generators
MIT License
148 stars 4 forks source link

Deserialise doesn't set missing properties to default #39

Closed trampster closed 3 years ago

trampster commented 3 years ago

When JsonSrcGen is reusing an existing object, if the property is missing in the json (rather than being null) then JsonSrcGen doesn't set the property to null in the class.

This means until this is fixed you have to set any properties to null before calling FromJson if it could be missing in the json.

trampster commented 3 years ago

done