FIMS  v0.8.0
Loading...
Searching...
No Matches
fims::JsonValue Class Reference

#include <fims_json.hpp>

Public Member Functions

 JsonValue ()
 
 JsonValue (int num)
 
 JsonValue (double num)
 
 JsonValue (const std::string &str)
 
 JsonValue (bool b)
 
 JsonValue (const JsonObject &obj)
 
 JsonValue (const JsonArray &arr)
 
JsonValueType GetType () const
 
int GetInt () const
 
double GetDouble () const
 
const std::string & GetString () const
 
bool GetBool () const
 
JsonObjectGetObject ()
 
JsonArrayGetArray ()
 

Detailed Description

Represents a JSON value.

Constructor & Destructor Documentation

◆ JsonValue() [1/7]

fims::JsonValue::JsonValue ( )
inline

Default constructor, initializes to Null value.

◆ JsonValue() [2/7]

fims::JsonValue::JsonValue ( int  num)
inline

Constructor for numeric JSON value (i.e., integer).

◆ JsonValue() [3/7]

fims::JsonValue::JsonValue ( double  num)
inline

Constructor for numeric JSON value (i.e., double).

◆ JsonValue() [4/7]

fims::JsonValue::JsonValue ( const std::string &  str)
inline

Constructor for string JSON value.

◆ JsonValue() [5/7]

fims::JsonValue::JsonValue ( bool  b)
inline

Constructor for boolean JSON value.

◆ JsonValue() [6/7]

fims::JsonValue::JsonValue ( const JsonObject obj)
inline

Constructor for JSON object value.

◆ JsonValue() [7/7]

fims::JsonValue::JsonValue ( const JsonArray arr)
inline

Constructor for JSON array value.

Member Function Documentation

◆ GetArray()

JsonArray & fims::JsonValue::GetArray ( )
inline

Get the JSON array.

◆ GetBool()

bool fims::JsonValue::GetBool ( ) const
inline

Get the boolean value.

◆ GetDouble()

double fims::JsonValue::GetDouble ( ) const
inline

Get the numeric value as a double.

◆ GetInt()

int fims::JsonValue::GetInt ( ) const
inline

Get the numeric value as an integer.

◆ GetObject()

JsonObject & fims::JsonValue::GetObject ( )
inline

Get the JSON object.

◆ GetString()

const std::string & fims::JsonValue::GetString ( ) const
inline

Get the string value.

◆ GetType()

JsonValueType fims::JsonValue::GetType ( ) const
inline

Get the type of the JSON value.


The documentation for this class was generated from the following file: