OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::json Namespace Reference

Functions

Json::Value read_fast (const std::string &fn, const bool optional=true, std::uint64_t *mtime_ns=nullptr)
 
Json::Value read_fast_dict (const std::string &fn, const bool optional=true, std::uint64_t *mtime_ns=nullptr)
 
void write_atomic (const std::string &fn, const std::string &tmpdir, const mode_t mode, const std::uint64_t mtime_ns, const Json::Value &root, const size_t size_hint, StrongRandomAPI &rng)
 
void write_fast (const std::string &fn, const mode_t mode, const std::uint64_t mtime_ns, const Json::Value &root, const size_t size_hint)
 
 OPENVPN_EXCEPTION (json_parse)
 
template<typename TITLE >
Json::Value parse (const std::string &str, const TITLE &title)
 
Json::Value parse (const std::string &str)
 
Json::Value parse_from_file (const std::string &fn)
 
template<typename BUFFER , typename TITLE >
Json::Value parse_from_buffer (const BUFFER &buf, const TITLE &title)
 
template<typename T , typename NAME >
void from_vector (Json::Value &root, const T &vec, const NAME &name)
 
template<typename TITLE >
void assert_dict (const Json::Value &obj, const TITLE &title)
 
template<typename TITLE >
bool is_dict (const Json::Value &obj, const TITLE &title)
 
template<typename NAME >
bool exists (const Json::Value &root, const NAME &name)
 
template<typename NAME >
bool string_exists (const Json::Value &root, const NAME &name)
 
template<typename T , typename NAME , typename TITLE >
void to_vector (const Json::Value &root, T &vec, const NAME &name, const TITLE &title)
 
template<typename NAME , typename TITLE >
std::string get_string (const Json::Value &root, const NAME &name, const TITLE &title)
 
template<typename NAME >
std::string get_string (const Json::Value &root, const NAME &name)
 
template<typename NAME , typename TITLE >
std::string get_string_optional (const Json::Value &root, const NAME &name, const std::string &default_value, const TITLE &title)
 
template<typename NAME >
std::string get_string_optional (const Json::Value &root, const NAME &name, const std::string &default_value)
 
template<typename TITLE >
std::string get_string_from_array (const Json::Value &root, const Json::ArrayIndex index, const TITLE &title)
 
std::string get_string_from_array (const Json::Value &root, const Json::ArrayIndex index)
 
template<typename NAME , typename TITLE >
int get_int (const Json::Value &root, const NAME &name, const TITLE &title)
 
template<typename NAME >
int get_int (const Json::Value &root, const NAME &name)
 
template<typename NAME , typename TITLE >
int get_int_optional (const Json::Value &root, const NAME &name, const int default_value, const TITLE &title)
 
template<typename NAME >
int get_int_optional (const Json::Value &root, const NAME &name, const int default_value)
 
template<typename NAME , typename TITLE >
unsigned int get_uint (const Json::Value &root, const NAME &name, const TITLE &title)
 
template<typename NAME >
unsigned int get_uint (const Json::Value &root, const NAME &name)
 
template<typename NAME , typename TITLE >
unsigned int get_uint_optional (const Json::Value &root, const NAME &name, const unsigned int default_value, const TITLE &title)
 
template<typename NAME >
unsigned int get_uint_optional (const Json::Value &root, const NAME &name, const unsigned int default_value)
 
template<typename NAME , typename TITLE >
unsigned int get_uint_via_string (const Json::Value &root, const NAME &name, const TITLE &title)
 
template<typename NAME >
unsigned int get_uint_via_string (const Json::Value &root, const NAME &name)
 
template<typename NAME , typename TITLE >
unsigned int get_uint_optional_via_string (const Json::Value &root, const NAME &name, const unsigned int default_value, const TITLE &title)
 
template<typename NAME >
unsigned int get_uint_optional_via_string (const Json::Value &root, const NAME &name, const unsigned int default_value)
 
template<typename NAME , typename TITLE >
std::uint64_t get_uint64 (const Json::Value &root, const NAME &name, const TITLE &title)
 
template<typename NAME >
std::uint64_t get_uint64 (const Json::Value &root, const NAME &name)
 
template<typename NAME , typename TITLE >
std::uint64_t get_uint64_optional (const Json::Value &root, const NAME &name, const std::uint64_t default_value, const TITLE &title)
 
template<typename NAME , typename TITLE >
std::int64_t get_int64_optional (const Json::Value &root, const NAME &name, const std::uint64_t default_value, const TITLE &title)
 
template<typename NAME >
std::uint64_t get_uint64_optional (const Json::Value &root, const NAME &name, const std::uint64_t default_value)
 
template<typename NAME , typename TITLE >
std::uint64_t get_integer_optional (const Json::Value &root, const NAME &name, const std::uint64_t default_value, const TITLE &title)
 
template<typename NAME , typename TITLE >
std::int64_t get_integer_optional (const Json::Value &root, const NAME &name, const std::int64_t default_value, const TITLE &title)
 
template<typename NAME , typename TITLE >
unsigned int get_integer_optional (const Json::Value &root, const NAME &name, const unsigned int default_value, const TITLE &title)
 
template<typename NAME , typename TITLE >
int get_integer_optional (const Json::Value &root, const NAME &name, const int default_value, const TITLE &title)
 
template<typename NAME , typename TITLE >
std::uint64_t get_uint64_via_string (const Json::Value &root, const NAME &name, const TITLE &title)
 
template<typename NAME >
std::uint64_t get_uint64_via_string (const Json::Value &root, const NAME &name)
 
template<typename NAME , typename TITLE >
std::uint64_t get_uint64_optional_via_string (const Json::Value &root, const NAME &name, const std::uint64_t default_value, const TITLE &title)
 
template<typename NAME >
std::uint64_t get_uint64_optional_via_string (const Json::Value &root, const NAME &name, const std::uint64_t default_value)
 
template<typename NAME , typename TITLE >
bool get_bool (const Json::Value &root, const NAME &name, const TITLE &title)
 
template<typename NAME >
bool get_bool (const Json::Value &root, const NAME &name)
 
template<typename NAME >
bool get_bool_optional (const Json::Value &root, const NAME &name, const bool default_value=false)
 
template<typename NAME >
int get_bool_tristate (const Json::Value &root, const NAME &name)
 
template<typename NAME , typename TITLE >
const Json::Value & get_dict (const Json::Value &root, const NAME &name, const bool optional, const TITLE &title)
 
template<typename NAME >
const Json::Value & get_dict (const Json::Value &root, const NAME &name, const bool optional)
 
template<typename NAME , typename TITLE >
Json::Value get_dict (Json::Value &&root, const NAME &name, const bool optional, const TITLE &title)
 
template<typename NAME >
Json::Value get_dict (Json::Value &&root, const NAME &name, const bool optional)
 
template<typename TITLE >
const Json::Value & cast_dict (const Json::Value &value, const bool optional, const TITLE &title)
 
const Json::Value & cast_dict (const Json::Value &value, const bool optional)
 
template<typename TITLE >
Json::Value cast_dict (Json::Value &&value, const bool optional, const TITLE &title)
 
Json::Value cast_dict (Json::Value &&value, const bool optional)
 
template<typename NAME , typename TITLE >
const Json::Value & get_array (const Json::Value &root, const NAME &name, const bool optional, const TITLE &title)
 
template<typename NAME >
const Json::Value & get_array (const Json::Value &root, const NAME &name, const bool optional)
 
template<typename NAME , typename TITLE >
Json::Value get_array (Json::Value &&root, const NAME &name, const bool optional, const TITLE &title)
 
template<typename NAME >
Json::Value get_array (Json::Value &&root, const NAME &name, const bool optional)
 
template<typename TITLE >
const Json::Value & cast_array (const Json::Value &value, const bool optional, const TITLE &title)
 
const Json::Value & cast_array (const Json::Value &value, const bool optional)
 
template<typename TITLE >
Json::Value cast_array (Json::Value &&value, const bool optional, const TITLE &title)
 
Json::Value cast_array (Json::Value &&value, const bool optional)
 
template<typename NAME , typename TITLE >
void to_string (const Json::Value &root, std::string &dest, const NAME &name, const TITLE &title)
 
template<typename NAME , typename TITLE >
void to_string_optional (const Json::Value &root, std::string &dest, const NAME &name, const std::string &default_value, const TITLE &title)
 
template<typename NAME , typename TITLE >
void to_int (const Json::Value &root, int &dest, const NAME &name, const TITLE &title)
 
template<typename NAME , typename TITLE >
void to_uchar (const Json::Value &root, unsigned char &dest, const NAME &name, const TITLE &title)
 
template<typename NAME , typename TITLE >
void to_uint (const Json::Value &root, unsigned int &dest, const NAME &name, const TITLE &title)
 
template<typename NAME , typename TITLE >
void to_uint_optional (const Json::Value &root, unsigned int &dest, const NAME &name, const unsigned int default_value, const TITLE &title)
 
template<typename NAME , typename TITLE >
void to_uint64 (const Json::Value &root, std::uint64_t &dest, const NAME &name, const TITLE &title)
 
template<typename NAME , typename TITLE >
void to_bool (const Json::Value &root, bool &dest, const NAME &name, const TITLE &title)
 
void format_compact (const Json::Value &root, Buffer &buf)
 
std::string format_compact (const Json::Value &root, const size_t size_hint=256)
 
void format (const Json::Value &root, Buffer &buf)
 
std::string format (const Json::Value &root)
 
std::string error (const Json::Value &root)
 
Json::Value dict_result (Json::Value jr)
 
template<typename NAME , typename TITLE >
std::string fmt_name (const NAME &name, const TITLE &title)
 
template<typename TITLE , typename std::enable_if<!std::is_arithmetic< TITLE >::value, int >::type = 0>
std::string fmt_name_cast (const TITLE &title)
 

Function Documentation

◆ assert_dict()

template<typename TITLE >
void openvpn::json::assert_dict ( const Json::Value &  obj,
const TITLE &  title 
)
inline

Definition at line 163 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ cast_array() [1/4]

const Json::Value & openvpn::json::cast_array ( const Json::Value &  value,
const bool  optional 
)
inline

Definition at line 787 of file jsonhelper.hpp.

◆ cast_array() [2/4]

template<typename TITLE >
const Json::Value & openvpn::json::cast_array ( const Json::Value &  value,
const bool  optional,
const TITLE &  title 
)
inline

Definition at line 771 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ cast_array() [3/4]

Json::Value openvpn::json::cast_array ( Json::Value &&  value,
const bool  optional 
)
inline

Definition at line 803 of file jsonhelper.hpp.

◆ cast_array() [4/4]

template<typename TITLE >
Json::Value openvpn::json::cast_array ( Json::Value &&  value,
const bool  optional,
const TITLE &  title 
)
inline

Definition at line 794 of file jsonhelper.hpp.

◆ cast_dict() [1/4]

const Json::Value & openvpn::json::cast_dict ( const Json::Value &  value,
const bool  optional 
)
inline

Definition at line 701 of file jsonhelper.hpp.

◆ cast_dict() [2/4]

template<typename TITLE >
const Json::Value & openvpn::json::cast_dict ( const Json::Value &  value,
const bool  optional,
const TITLE &  title 
)
inline

Definition at line 685 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ cast_dict() [3/4]

Json::Value openvpn::json::cast_dict ( Json::Value &&  value,
const bool  optional 
)
inline

Definition at line 717 of file jsonhelper.hpp.

◆ cast_dict() [4/4]

template<typename TITLE >
Json::Value openvpn::json::cast_dict ( Json::Value &&  value,
const bool  optional,
const TITLE &  title 
)
inline

Definition at line 708 of file jsonhelper.hpp.

◆ dict_result()

Json::Value openvpn::json::dict_result ( Json::Value  jr)
inline

Definition at line 939 of file jsonhelper.hpp.

◆ error()

std::string openvpn::json::error ( const Json::Value &  root)
inline

Definition at line 927 of file jsonhelper.hpp.

◆ exists()

template<typename NAME >
bool openvpn::json::exists ( const Json::Value &  root,
const NAME &  name 
)
inline

Definition at line 179 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ fmt_name()

template<typename NAME , typename TITLE >
std::string openvpn::json::fmt_name ( const NAME &  name,
const TITLE &  title 
)
inline

Definition at line 22 of file jsonhelperfmt.hpp.

Here is the caller graph for this function:

◆ fmt_name_cast()

template<typename TITLE , typename std::enable_if<!std::is_arithmetic< TITLE >::value, int >::type = 0>
std::string openvpn::json::fmt_name_cast ( const TITLE &  title)
inline

Definition at line 33 of file jsonhelperfmt.hpp.

Here is the caller graph for this function:

◆ format() [1/2]

std::string openvpn::json::format ( const Json::Value &  root)
inline

Definition at line 922 of file jsonhelper.hpp.

◆ format() [2/2]

void openvpn::json::format ( const Json::Value &  root,
Buffer buf 
)
inline

Definition at line 909 of file jsonhelper.hpp.

◆ format_compact() [1/2]

void openvpn::json::format_compact ( const Json::Value &  root,
Buffer buf 
)
inline

Definition at line 888 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ format_compact() [2/2]

std::string openvpn::json::format_compact ( const Json::Value &  root,
const size_t  size_hint = 256 
)
inline

Definition at line 901 of file jsonhelper.hpp.

◆ from_vector()

template<typename T , typename NAME >
void openvpn::json::from_vector ( Json::Value &  root,
const T &  vec,
const NAME &  name 
)
inline

Definition at line 153 of file jsonhelper.hpp.

◆ get_array() [1/4]

template<typename NAME >
const Json::Value & openvpn::json::get_array ( const Json::Value &  root,
const NAME &  name,
const bool  optional 
)
inline

Definition at line 744 of file jsonhelper.hpp.

◆ get_array() [2/4]

template<typename NAME , typename TITLE >
const Json::Value & openvpn::json::get_array ( const Json::Value &  root,
const NAME &  name,
const bool  optional,
const TITLE &  title 
)
inline

Definition at line 725 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_array() [3/4]

template<typename NAME >
Json::Value openvpn::json::get_array ( Json::Value &&  root,
const NAME &  name,
const bool  optional 
)
inline

Definition at line 762 of file jsonhelper.hpp.

◆ get_array() [4/4]

template<typename NAME , typename TITLE >
Json::Value openvpn::json::get_array ( Json::Value &&  root,
const NAME &  name,
const bool  optional,
const TITLE &  title 
)
inline

Definition at line 752 of file jsonhelper.hpp.

◆ get_bool() [1/2]

template<typename NAME >
bool openvpn::json::get_bool ( const Json::Value &  root,
const NAME &  name 
)
inline

Definition at line 609 of file jsonhelper.hpp.

◆ get_bool() [2/2]

template<typename NAME , typename TITLE >
bool openvpn::json::get_bool ( const Json::Value &  root,
const NAME &  name,
const TITLE &  title 
)
inline

Definition at line 596 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_bool_optional()

template<typename NAME >
bool openvpn::json::get_bool_optional ( const Json::Value &  root,
const NAME &  name,
const bool  default_value = false 
)
inline

Definition at line 615 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_bool_tristate()

template<typename NAME >
int openvpn::json::get_bool_tristate ( const Json::Value &  root,
const NAME &  name 
)
inline

Definition at line 627 of file jsonhelper.hpp.

◆ get_dict() [1/4]

template<typename NAME >
const Json::Value & openvpn::json::get_dict ( const Json::Value &  root,
const NAME &  name,
const bool  optional 
)
inline

Definition at line 658 of file jsonhelper.hpp.

◆ get_dict() [2/4]

template<typename NAME , typename TITLE >
const Json::Value & openvpn::json::get_dict ( const Json::Value &  root,
const NAME &  name,
const bool  optional,
const TITLE &  title 
)
inline

Definition at line 639 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_dict() [3/4]

template<typename NAME >
Json::Value openvpn::json::get_dict ( Json::Value &&  root,
const NAME &  name,
const bool  optional 
)
inline

Definition at line 676 of file jsonhelper.hpp.

◆ get_dict() [4/4]

template<typename NAME , typename TITLE >
Json::Value openvpn::json::get_dict ( Json::Value &&  root,
const NAME &  name,
const bool  optional,
const TITLE &  title 
)
inline

Definition at line 666 of file jsonhelper.hpp.

◆ get_int() [1/2]

template<typename NAME >
int openvpn::json::get_int ( const Json::Value &  root,
const NAME &  name 
)
inline

Definition at line 332 of file jsonhelper.hpp.

◆ get_int() [2/2]

template<typename NAME , typename TITLE >
int openvpn::json::get_int ( const Json::Value &  root,
const NAME &  name,
const TITLE &  title 
)
inline

Definition at line 319 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_int64_optional()

template<typename NAME , typename TITLE >
std::int64_t openvpn::json::get_int64_optional ( const Json::Value &  root,
const NAME &  name,
const std::uint64_t  default_value,
const TITLE &  title 
)
inline

Definition at line 484 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_int_optional() [1/2]

template<typename NAME >
int openvpn::json::get_int_optional ( const Json::Value &  root,
const NAME &  name,
const int  default_value 
)
inline

Definition at line 352 of file jsonhelper.hpp.

◆ get_int_optional() [2/2]

template<typename NAME , typename TITLE >
int openvpn::json::get_int_optional ( const Json::Value &  root,
const NAME &  name,
const int  default_value,
const TITLE &  title 
)
inline

Definition at line 338 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_integer_optional() [1/4]

template<typename NAME , typename TITLE >
int openvpn::json::get_integer_optional ( const Json::Value &  root,
const NAME &  name,
const int  default_value,
const TITLE &  title 
)
inline

Definition at line 538 of file jsonhelper.hpp.

◆ get_integer_optional() [2/4]

template<typename NAME , typename TITLE >
std::int64_t openvpn::json::get_integer_optional ( const Json::Value &  root,
const NAME &  name,
const std::int64_t  default_value,
const TITLE &  title 
)

Definition at line 520 of file jsonhelper.hpp.

◆ get_integer_optional() [3/4]

template<typename NAME , typename TITLE >
std::uint64_t openvpn::json::get_integer_optional ( const Json::Value &  root,
const NAME &  name,
const std::uint64_t  default_value,
const TITLE &  title 
)

Definition at line 511 of file jsonhelper.hpp.

◆ get_integer_optional() [4/4]

template<typename NAME , typename TITLE >
unsigned int openvpn::json::get_integer_optional ( const Json::Value &  root,
const NAME &  name,
const unsigned int  default_value,
const TITLE &  title 
)
inline

Definition at line 529 of file jsonhelper.hpp.

◆ get_string() [1/2]

template<typename NAME >
std::string openvpn::json::get_string ( const Json::Value &  root,
const NAME &  name 
)
inline

Definition at line 223 of file jsonhelper.hpp.

◆ get_string() [2/2]

template<typename NAME , typename TITLE >
std::string openvpn::json::get_string ( const Json::Value &  root,
const NAME &  name,
const TITLE &  title 
)
inline

Definition at line 210 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_string_from_array() [1/2]

std::string openvpn::json::get_string_from_array ( const Json::Value &  root,
const Json::ArrayIndex  index 
)
inline

Definition at line 312 of file jsonhelper.hpp.

◆ get_string_from_array() [2/2]

template<typename TITLE >
std::string openvpn::json::get_string_from_array ( const Json::Value &  root,
const Json::ArrayIndex  index,
const TITLE &  title 
)
inline

Definition at line 300 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_string_optional() [1/2]

template<typename NAME >
std::string openvpn::json::get_string_optional ( const Json::Value &  root,
const NAME &  name,
const std::string &  default_value 
)
inline

Definition at line 292 of file jsonhelper.hpp.

◆ get_string_optional() [2/2]

template<typename NAME , typename TITLE >
std::string openvpn::json::get_string_optional ( const Json::Value &  root,
const NAME &  name,
const std::string &  default_value,
const TITLE &  title 
)
inline

Definition at line 278 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_uint() [1/2]

template<typename NAME >
unsigned int openvpn::json::get_uint ( const Json::Value &  root,
const NAME &  name 
)
inline

Definition at line 373 of file jsonhelper.hpp.

◆ get_uint() [2/2]

template<typename NAME , typename TITLE >
unsigned int openvpn::json::get_uint ( const Json::Value &  root,
const NAME &  name,
const TITLE &  title 
)
inline

Definition at line 360 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_uint64() [1/2]

template<typename NAME >
std::uint64_t openvpn::json::get_uint64 ( const Json::Value &  root,
const NAME &  name 
)
inline

Definition at line 464 of file jsonhelper.hpp.

◆ get_uint64() [2/2]

template<typename NAME , typename TITLE >
std::uint64_t openvpn::json::get_uint64 ( const Json::Value &  root,
const NAME &  name,
const TITLE &  title 
)
inline

Definition at line 451 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_uint64_optional() [1/2]

template<typename NAME >
std::uint64_t openvpn::json::get_uint64_optional ( const Json::Value &  root,
const NAME &  name,
const std::uint64_t  default_value 
)
inline

Definition at line 498 of file jsonhelper.hpp.

◆ get_uint64_optional() [2/2]

template<typename NAME , typename TITLE >
std::uint64_t openvpn::json::get_uint64_optional ( const Json::Value &  root,
const NAME &  name,
const std::uint64_t  default_value,
const TITLE &  title 
)
inline

Definition at line 470 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_uint64_optional_via_string() [1/2]

template<typename NAME >
std::uint64_t openvpn::json::get_uint64_optional_via_string ( const Json::Value &  root,
const NAME &  name,
const std::uint64_t  default_value 
)
inline

Definition at line 589 of file jsonhelper.hpp.

◆ get_uint64_optional_via_string() [2/2]

template<typename NAME , typename TITLE >
std::uint64_t openvpn::json::get_uint64_optional_via_string ( const Json::Value &  root,
const NAME &  name,
const std::uint64_t  default_value,
const TITLE &  title 
)
inline

Definition at line 571 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_uint64_via_string() [1/2]

template<typename NAME >
std::uint64_t openvpn::json::get_uint64_via_string ( const Json::Value &  root,
const NAME &  name 
)
inline

Definition at line 564 of file jsonhelper.hpp.

◆ get_uint64_via_string() [2/2]

template<typename NAME , typename TITLE >
std::uint64_t openvpn::json::get_uint64_via_string ( const Json::Value &  root,
const NAME &  name,
const TITLE &  title 
)
inline

Definition at line 547 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_uint_optional() [1/2]

template<typename NAME >
unsigned int openvpn::json::get_uint_optional ( const Json::Value &  root,
const NAME &  name,
const unsigned int  default_value 
)
inline

Definition at line 393 of file jsonhelper.hpp.

◆ get_uint_optional() [2/2]

template<typename NAME , typename TITLE >
unsigned int openvpn::json::get_uint_optional ( const Json::Value &  root,
const NAME &  name,
const unsigned int  default_value,
const TITLE &  title 
)
inline

Definition at line 379 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_uint_optional_via_string() [1/2]

template<typename NAME >
unsigned int openvpn::json::get_uint_optional_via_string ( const Json::Value &  root,
const NAME &  name,
const unsigned int  default_value 
)
inline

Definition at line 443 of file jsonhelper.hpp.

◆ get_uint_optional_via_string() [2/2]

template<typename NAME , typename TITLE >
unsigned int openvpn::json::get_uint_optional_via_string ( const Json::Value &  root,
const NAME &  name,
const unsigned int  default_value,
const TITLE &  title 
)
inline

Definition at line 425 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ get_uint_via_string() [1/2]

template<typename NAME >
unsigned int openvpn::json::get_uint_via_string ( const Json::Value &  root,
const NAME &  name 
)
inline

Definition at line 418 of file jsonhelper.hpp.

◆ get_uint_via_string() [2/2]

template<typename NAME , typename TITLE >
unsigned int openvpn::json::get_uint_via_string ( const Json::Value &  root,
const NAME &  name,
const TITLE &  title 
)
inline

Definition at line 401 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ is_dict()

template<typename TITLE >
bool openvpn::json::is_dict ( const Json::Value &  obj,
const TITLE &  title 
)
inline

Definition at line 170 of file jsonhelper.hpp.

◆ OPENVPN_EXCEPTION()

openvpn::json::OPENVPN_EXCEPTION ( json_parse  )

◆ parse() [1/2]

Json::Value openvpn::json::parse ( const std::string &  str)
inline

Definition at line 71 of file jsonhelper.hpp.

◆ parse() [2/2]

template<typename TITLE >
Json::Value openvpn::json::parse ( const std::string &  str,
const TITLE &  title 
)
inline

Definition at line 54 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ parse_from_buffer()

template<typename BUFFER , typename TITLE >
Json::Value openvpn::json::parse_from_buffer ( const BUFFER &  buf,
const TITLE &  title 
)
inline

Definition at line 82 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ parse_from_file()

Json::Value openvpn::json::parse_from_file ( const std::string &  fn)
inline

Definition at line 76 of file jsonhelper.hpp.

Here is the caller graph for this function:

◆ read_fast()

Json::Value openvpn::json::read_fast ( const std::string &  fn,
const bool  optional = true,
std::uint64_t *  mtime_ns = nullptr 
)
inline

Definition at line 19 of file jsonfile.hpp.

Here is the caller graph for this function:

◆ read_fast_dict()

Json::Value openvpn::json::read_fast_dict ( const std::string &  fn,
const bool  optional = true,
std::uint64_t *  mtime_ns = nullptr 
)
inline

Definition at line 29 of file jsonfile.hpp.

◆ string_exists()

template<typename NAME >
bool openvpn::json::string_exists ( const Json::Value &  root,
const NAME &  name 
)
inline

Definition at line 187 of file jsonhelper.hpp.

◆ to_bool()

template<typename NAME , typename TITLE >
void openvpn::json::to_bool ( const Json::Value &  root,
bool &  dest,
const NAME &  name,
const TITLE &  title 
)
inline

Definition at line 880 of file jsonhelper.hpp.

◆ to_int()

template<typename NAME , typename TITLE >
void openvpn::json::to_int ( const Json::Value &  root,
int &  dest,
const NAME &  name,
const TITLE &  title 
)
inline

Definition at line 829 of file jsonhelper.hpp.

◆ to_string()

template<typename NAME , typename TITLE >
void openvpn::json::to_string ( const Json::Value &  root,
std::string &  dest,
const NAME &  name,
const TITLE &  title 
)
inline

Definition at line 810 of file jsonhelper.hpp.

◆ to_string_optional()

template<typename NAME , typename TITLE >
void openvpn::json::to_string_optional ( const Json::Value &  root,
std::string &  dest,
const NAME &  name,
const std::string &  default_value,
const TITLE &  title 
)
inline

Definition at line 819 of file jsonhelper.hpp.

◆ to_uchar()

template<typename NAME , typename TITLE >
void openvpn::json::to_uchar ( const Json::Value &  root,
unsigned char &  dest,
const NAME &  name,
const TITLE &  title 
)
inline

Definition at line 838 of file jsonhelper.hpp.

◆ to_uint()

template<typename NAME , typename TITLE >
void openvpn::json::to_uint ( const Json::Value &  root,
unsigned int &  dest,
const NAME &  name,
const TITLE &  title 
)
inline

Definition at line 852 of file jsonhelper.hpp.

◆ to_uint64()

template<typename NAME , typename TITLE >
void openvpn::json::to_uint64 ( const Json::Value &  root,
std::uint64_t &  dest,
const NAME &  name,
const TITLE &  title 
)
inline

Definition at line 871 of file jsonhelper.hpp.

◆ to_uint_optional()

template<typename NAME , typename TITLE >
void openvpn::json::to_uint_optional ( const Json::Value &  root,
unsigned int &  dest,
const NAME &  name,
const unsigned int  default_value,
const TITLE &  title 
)
inline

Definition at line 861 of file jsonhelper.hpp.

◆ to_vector()

template<typename T , typename NAME , typename TITLE >
void openvpn::json::to_vector ( const Json::Value &  root,
T &  vec,
const NAME &  name,
const TITLE &  title 
)
inline

Definition at line 195 of file jsonhelper.hpp.

◆ write_atomic()

void openvpn::json::write_atomic ( const std::string &  fn,
const std::string &  tmpdir,
const mode_t  mode,
const std::uint64_t  mtime_ns,
const Json::Value &  root,
const size_t  size_hint,
StrongRandomAPI rng 
)
inline

Definition at line 41 of file jsonfile.hpp.

◆ write_fast()

void openvpn::json::write_fast ( const std::string &  fn,
const mode_t  mode,
const std::uint64_t  mtime_ns,
const Json::Value &  root,
const size_t  size_hint 
)
inline

Definition at line 54 of file jsonfile.hpp.