-
Notifications
You must be signed in to change notification settings - Fork 871
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 array serialisation with 'null' member #8531
Comments
Hi @mjoa Thank you very much for pointing it out, I'll check it ASAP Luigi |
Hi @luigidellaquila
The element itself looks pretty good. So the problem might go down to the Just to have that said, the 'manual' insert works as expected.
|
Hi @mjoa I found the problem (it was at a much lower level, on disk serialization) and fixed it. The fix will be released with v 3.0.8 Thanks Luigi |
Thanks @luigidellaquila for your support! Great you could fix it that fast. We looking forward to the upcoming version. |
OrientDB Version: 3.0.5
Java Version: 1.8
OS: macOS 10.13
Expected behavior
Creating a correct JSON document.
Actual behavior
If a provided JSON document contains an array and the last member in an array element is null the JSON document is not correctly processed. It looks like the
ORecord.fromJSON(String iJson)
which goes down toORecordSerializerJSON.fromString(String iSource, ORecord iRecord, final String[] iFields)
doesn't handle it correctly.Example:
Steps to reproduce
Create a new OElement and call the
fromJSON(String iJson)
method with a JSON document containing an array having a null member in last position of an array item.Input
Output
The behaviour is at least reproducible with
orientdb-client
version3.0.5
,3.0.6
and3.0.7
.A simple JUnit test case:
odb-json-test.zip
The text was updated successfully, but these errors were encountered: