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?
- Disallowing unrecognized keys.
- Specifying keys as required or optional.
- Specifying the expected value type of keys (null, bool, int, float, array, dictionary).
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.