This adds a serialize method to documents and fixes a few small issues that cropped up when testing those changes. Notably an is_null method was added since it became apparent that otherwise there's no way to tell. More importantly though, document members no longer resolve to their target shapes, but rather the proper member shapes. This necessitated some changes to setitem. Lastly, some improvements were added to shape type inference that leave the result as document only when the value is null.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This adds a serialize method to documents and fixes a few small issues that cropped up when testing those changes. Notably an is_null method was added since it became apparent that otherwise there's no way to tell. More importantly though, document members no longer resolve to their target shapes, but rather the proper member shapes. This necessitated some changes to setitem. Lastly, some improvements were added to shape type inference that leave the result as document only when the value is null.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.