Skip to content
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

JSON reader fails in case of empty bytes field #582

Closed
mikir opened this issue Apr 2, 2024 · 1 comment
Closed

JSON reader fails in case of empty bytes field #582

mikir opened this issue Apr 2, 2024 · 1 comment
Assignees
Labels
bug Something isn't working c++ C++ language generator java Java language generator python Python language generator
Milestone

Comments

@mikir
Copy link
Contributor

mikir commented Apr 2, 2024

What version of Zserio and what language are you using?
Zserio: 2.13.0
Language: Python, Java, C++

Describe the bug
If JSON file contains empty bytes field, e.g.

"myBytes": {
                "buffer": [
                ]
           }

the JSON reader in Python throws exception:

zserio.exception.PythonRuntimeException: JsonReader: Unexpected end in bytes!

To Reproduce
Just create schema with empty bytes field, write it to JSON and read it again.

Expected behavior
No exception.

Additional context:
The same problem is for C++ and Java.

@mikir mikir added bug Something isn't working java Java language generator c++ C++ language generator labels Apr 2, 2024
@mikir mikir added this to the 2.14 milestone Apr 2, 2024
@mikir mikir self-assigned this Apr 3, 2024
@mikir
Copy link
Contributor Author

mikir commented Apr 3, 2024

See related #581.

@mikir mikir added the python Python language generator label Apr 3, 2024
@mikir mikir closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working c++ C++ language generator java Java language generator python Python language generator
Projects
None yet
Development

No branches or pull requests

1 participant