#include <Pt/Json/Node.h>
JSON document node. More...
Inherited by Boolean, EndArray, EndDocument, EndObject, Float, Integer, Member, Null, StartArray, StartObject, and String.
Public Member Functions | |
| virtual | ~Node () |
| Destructor. | |
| Type | type () const |
| Returns the type of the node. | |
Protected Member Functions | |
| Node (Type type) | |
| Constructs a new Node object with the specified node type. | |
The JsonReader reports the content of a JSON document as nodes. A node might be a start object, an end object, string, a start ducument or an end document. The specialized node classes have methods and data members to process the information specific to the node. So, this class serves more or less as an anchor for casting and as a common token type.
To cast to a derived node, a static_cast can be done after checking the node type, or the helper functions such as toStartObject() can be used.