151 Added handling for null class objects
Description
See issue 151 here
Proposed changes in this PR
- Allow the fromSerializable strategy to return the primitive null value instead of having a null pointer exception.
- We expect to send null in the request.
- Undefined is protected at the level above, which makes sense, as we don't want to send it over the wire. No changes to be made in that case.
Things to look at
- [x] Test coverage
- [x] Code Style
- [x] Documentation (
README.md,CHANGELOG.md, etc..)
Right now, there is a type error on many fields. I have not figured out a nice way to appease typescript yet. Working on it.
performing a
deno test -c tsconfig.json --no-check
shows that all tests are passing.
EDIT: got it.
Also Thanks for the first contribution - please don't forget to add yourself to the CONTRIBUTORS.md file!
@hardy613 I don't mind rebuilding this PR ontop of your other changes. The image changes etc probably shouldn't be in the fix. I was in a bit of a hurry, and this could be a smaller PR.
What happened was we had to roll back to version 1.x for stability, and while this PR works well, it has been mildly forgotten (By mildy, probably we won't switch over to version 2.x until we have some time in summer).
Closing in favor of protect_against_null_serialization_v2