Skip to content

Change in JSON::Object::set(key,value) behavior in 1.6.1 #933

@obiltschnig

Description

@obiltschnig

void Object::set(const std::string& key, const Dynamic::Var& value)
{
//Calling with preserverInsOrder == false.
New code doesn't overwrite existing value:
std::pair<ValueMap::iterator, bool=""> ret = _values.insert(ValueMap::value_type(key, value));
if (_preserveInsOrder)
Old code overwrote existing value:
_values[key] = value;
if (_preserveInsOrder)

Was this intentional? If so it should be documented, if not, add test case to make sure it gets overwritten.

(from https://sourceforge.net/p/poco/bugs/633/)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions