Skip to content

Add support for strongly typed arrays. #9

@tnovotny

Description

@tnovotny

The support for homogeneous arrays is missing. see StreamWriter<StreamType>::append_array

    //! \todo TODO... detect homogeneous arrays and treat accordingly
    //! WORK in progress

I think you made this difficult because you got the binary type wrong. I.E there is not one binary type, but all the strong typed arrays are different binary types. One should be able to write something like:

std::vector<int> ints = foo();
ubjson::Value value;
value["ints"] = ints;

and that should serialize into

[{][i][4][ints][[][$][I][#][i][5][1][2][3][4][5]

Note the [$][I]. The type of the array should be kept as passed in so that it is received that way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions