Skip to content

Poco::JSON::PrintHandler not working for objects in array #766

@jnytra

Description

@jnytra

Example source code:

#include <iostream>
#include <Poco/JSON/PrintHandler.h>

int main()
{
    Poco::JSON::PrintHandler handler(std::cout, 2);

    handler.startObject();
        handler.startArray();
          handler.startObject();
              handler.key("key1");
              handler.value(1);
          handler.endObject();
          handler.startObject();
              handler.key("key2");
              handler.value(1);
          handler.endObject();
        handler.endArray();
    handler.endObject();

  return 0;
}

output:

{
[
{
      "key1" :       1
    }{
,
      "key2" :       1
    }
  ]
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions