#include "fson/Value.hh"

Abstract base of every FSON value. Non-copyable, non-movable — duplicate with clone().

MemberDescription
enum class Type { Null, Boolean, Number, String, Array, Object }
getType() → Typedynamic type
clone() → std::unique_ptr<Value>deep copy including attached comments
isNull() … isObject() → booltype predicates
asNull() … asObject()checked castsnullptr on a type mismatch (const and non-const overloads). No dynamic_cast needed.
if( Number* n = v->asNumber() )     std::cout << n->asDouble();
else if( String* s = v->asString() ) std::cout << s->getValue();

Null — fson/Null.hh

The literal null. Default-constructible, no further state.

Boolean — fson/Boolean.hh

Boolean( bool = false );
bool getValue() const;
void setValue( bool );

Number and String

The two leaf types with real state have their own pages: Number, String.

The containers are Object and Array.