Boost logo

Boost Users :

Subject: [Boost-users] [property_tree] Population and Json formatting
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2013-06-20 13:18:13


Hello,

Question about property tree. I've got an "event" concept which I want
to serialize to Json through property tree. If I go something like
this:

ptree tree;
tree.set<int>("event.id", 1);

Then the resulting Json would look something like this?

{
  "event":
  {
    "id": 1
  }
}

or possibly?

{
  "event":
  {
    "id" : "1"
  }
}

or possibly, with pretty turned off (nicer for message framing).

{"event":{"id":"1"}}

Thank you...

Regards,

Michael Powell


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net