JohnWeisz / TypedJSON

Typed JSON parsing and serializing for TypeScript that preserves type information.
MIT License
603 stars 64 forks source link

Deserialize / convert missing / undefined / null fields? #197

Open dessalines opened 2 years ago

dessalines commented 2 years ago

I'd like to use a special None type, to convert missing values, or nulls, to my own special type. I've found the preserveNull: true option, but this still seems to skip deserialization and just carry the null forward. And more than that, I'd like to convert all missing fields to a special None type.