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.