|
faunus
|
Like json, but delete entries after access. More...
#include <json_support.h>


Public Member Functions | |
| SingleUseJSON (const json &) | |
| bool | empty () const |
| size_type | count (const std::string &) const |
| std::string | dump (int=-1) const |
| bool | is_object () const |
| void | clear () |
| json | at (const std::string &) |
| json | operator[] (const std::string &) |
| void | erase (const std::string &) |
| template<class T > | |
| T | value (const std::string &key, const T &fallback) |
Like json, but delete entries after access.
Only selected functions from the json class is exposed and and accessing a key it will be deleted afterwards, i.e. a key can be used only once. This can be used to check for unknown keys as the object should be zero after being processed by i.e. from_json or similar.
1.8.13