Skip to content

Poco::JSON::Object::set() should return reference to this to allow chaining. #2249

@obiltschnig

Description

@obiltschnig

One should be able to do this:

JSON::Object obj{Poco::JSON_PRESERVE_KEY_ORDER};
obj
    .set("protocol"s, "v2"s)
    .set("device"s, device)
    .set("at"s, "now"s)
    .set("data"s, JSON::Object()
        .set("temperature"s, temperature));

Same for Array::add() and Array::set().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions