Q:

Boost PropertyTree: How to read json array into?

So having such json:
{
  "config": {
    "name": "myconfig",
    "servecies": {
      "module": [
        "file",
        "Admin",
        "HR"
      ],
      "notModule": "MyNotModule"
    }
  }
}

How to parse module array into multimap<string,string>? and is it possible to find out if module is an array and notModule is not?

A:

Use a JSON parser. There isn't really anything in C++ that will do all the work for you, you must use an external parser (or roll out your own) and interpret the events as it steps through.
I have had a good experience with jsoncpp, and there are a few others listed on json.org under the C++ section.

