Skip to content

Invalid output on serializing nested arrays #80

@siilike

Description

@siilike

I am trying to serialize [1,[2]], but somehow the last byte is 03 instead of 02.

13 08 31 13 04 32 01 02 -- json-to-vpack (note that Parser uses private API)
13 08 31 13 04 32 01 03 -- my output

[1,[2,[3,[4,[5]]]]] produces:
13 14 31 13 10 32 13 0c 33 13 08 34 13 04 35 01 03 03 03 03
instead of
13 14 31 13 10 32 13 0c 33 13 08 34 13 04 35 01 02 02 02 02.

vpack-to-json complains "caught exception: length 0 is invalid for any VelocyPack value"

The arrays except for the outer one are written from inside Serializable, but the code that does it for both is the same.

I will try to produce a sample. This also happens with the indexed version.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions