smithy-lang / smithy-python

Smithy code generators and core modules for Python (in development)
Apache License 2.0
47 stars 10 forks source link

Remove read_optional in favor of is_null/read_null #280

Closed JordonPhillips closed 2 months ago

JordonPhillips commented 2 months ago

This removes read_optional in favor of is_null and read_null on shape deserializers. This lets us reduce the number of lambdas created and gives us more flexibility. This allows, for example, for skipping nulls in dense collections.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.