Closed kevinresol closed 3 years ago
Because in the past optional fields are not created when the querystring being parsed does not contain the entry.
Personally I don't mind, but weren't you working with document stores that start deleting data if an update object has a null field rather than a non-existent one?
Yeah, but in tink_json we resorted to use Option
to deal with that. I think we can do the same here.
Oh, totally forgot about that. Ok, cool then, I suppose ;)
2nd attempt on optional final fields.
Note that this is technically a breaking change. Because in the past optional fields are not created when the querystring being parsed does not contain the entry. But now, they will be set to null instead.
i.e. for the example code:
Reflect.hasField(parse(('foo=1':{foo:Int, ?bar:Int})), 'bar');
was:false
now:true