Skip to content

Creating array Value type is forcing unnecesary copying of array/list data. #184

@dawid7stars

Description

@dawid7stars

When creating a Value with empty constructor intended to be an array of data it is not possible to use Add method or indexer operator to add new data to it as it will throw an exception.

Exception is caused by default value_type of Value class to be set to OBJECT instead of UNDEFINED.

Solution one is to change the default value_type of default construtor.

solution two would be to create a public construtor taking value_type and data_type argument so that it can be chosen explicitly;

solution 3 create explicit static methods for creating ObjectValue and ArrayValue and posibly other value types.

Metadata

Metadata

Assignees

No one assigned

    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