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
Optimistically close string values in from_json if allow_partial is set to true #100
Comments
I'm not sure I agree. Lists are heterogenous: if a full list is valid, half a list should be as well. Objects are not. Cutting an object in half does not guarantee you can validate it. |
Hm, I'm specifically talking about closing strings. I mentioned objects because they are optimistically closed already:
If a value of a key is a string, it will always be a string, optimistically closing that string just lets us serve a partial string faster. |
Ah sorry, misunderstood. That makes sense. |
Just noticed this is a duplicate of #82. |
Right now if you're trying to parse a partial object, pydantic won't return the key until the string value is complete:
I'd expect this to result in:
similarly to how objects and lists are optimistically closed during partial rendering.
The text was updated successfully, but these errors were encountered: