-
Notifications
You must be signed in to change notification settings - Fork 636
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
decodeFromBufferedSource throws JsonDecodingException on big JSON #2006
Comments
Hm 🤔 GH didn't close this automatically when #2007 was merged. |
It closes automatically only when it is merged to |
I think this came back or #2007 wasn't a full fix. With a JSON file that's about 800KB on JVM, I get the unexpected EOF error at seemingly random indices.
Example trace:
|
@zacharee Do you have a stable reproducer? |
I did some more testing and it looks like it isn't the JSON library, but some quirk in Okio's file writing/reading not properly syncing when using |
Describe the bug
Trying to use new Okio streams, introduced recently and encountering
JsonDecodingException
when trying to decode big JSON viadecodeFromBufferedSource()
.decodeFromString()
works fine.To Reproduce
Exception error:
I've created github repository with reproducible example: https://github.com/Artman12/OkioTest
Expected behavior
decodeFromBufferedSource
decodes JSON correctly.Environment
The text was updated successfully, but these errors were encountered: