-
-
Notifications
You must be signed in to change notification settings - Fork 781
Refactor deserialization to support borrowed types #2648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…under the hood. Add `_raw` API to reader/searcher
… example implementations for `DocumentDeserialize` to existing types
…e `RefValue` to ensure no invalid state from objects or arrays
/// A struct that wraps an `OwnedBytes` and provides a read interface that can be used to read data | ||
/// from it while borrowing and will not invalidate references | ||
/// | ||
/// Useful for zerocopy deserialization since references remain valid after the cursor has advanced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mention zerocopy deserialization deserialization, but below there are several methods that copy bytes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those were left over from when I was testing - removed all the methods that are not in use.
The only remaining one is the Read
trait which is required for the legacy JSON object parser
…aryDocumentDeserializer so it can be used in type definitions
…ak existing applications
No description provided.