I have a project that will be using a single JSON file in order to describe the inner contents of the directory it is contained within. The Boost Property Tree library appears to be the best choice for a JSON parsing library. However, this JSON file (like many others) is expected to have a very particular layout, and so far I haven't found a good manner of expressing the rules in code.
Does the Boost Property Tree library have any methods allowing the user to do any of the following?
So far I've found this previous question which shines some light on how to translate some JSON key-value pairs into data structures, but it doesn't answer whether any of the capabilities listed above are possible.
Property Tree didn't take long for me to give up on due to lack of types (as sehe pointed out).
To take sehe's recommendation further, if you are dealing with JSON, I would recommend a user-friendly library like nlohmann's library instead. It is reasonably fast and intuitive.
There is also RapidJSON, which obsesses over every bit of memory allocation, etc, impacting usability, but the best performer in (its own) tests. I encountered difficulty with its handling of single-item arrays before moving to nlohmann's.