OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JsonUtils.h File Reference
#include <map>
#include <optional>
#include <vector>
#include <rapidjson/document.h>
#include "Logger/Logger.h"
#include "Shared/sqltypes.h"
+ Include dependency graph for JsonUtils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 json_utils
 

Functions

std::string json_utils::get_type_as_string (const rapidjson::Value &object)
 
template<class T >
void json_utils::add_value_to_object (rapidjson::Value &object, const T &value, const std::string &name, rapidjson::Document::AllocatorType &allocator)
 
template<class T >
void json_utils::get_value_from_object (const rapidjson::Value &object, T &value, const std::string &name)
 
std::optional< std::string > json_utils::get_optional_string_value_from_object (const rapidjson::Value &object, const std::string &key)
 
void json_utils::set_value (rapidjson::Value &json_val, const size_t &value, rapidjson::Document::AllocatorType &allocator)
 
void json_utils::get_value (const rapidjson::Value &json_val, size_t &value)
 
void json_utils::set_value (rapidjson::Value &json_val, const int &value, rapidjson::Document::AllocatorType &allocator)
 
void json_utils::get_value (const rapidjson::Value &json_val, int &value)
 
void json_utils::set_value (rapidjson::Value &json_val, const std::string &value, rapidjson::Document::AllocatorType &allocator)
 
void json_utils::get_value (const rapidjson::Value &json_val, std::string &value)
 
void json_utils::set_value (rapidjson::Value &json_val, const int64_t &value, rapidjson::Document::AllocatorType &allocator)
 
void json_utils::get_value (const rapidjson::Value &json_val, int64_t &value)
 
void json_utils::set_value (rapidjson::Value &json_val, const bool &value, rapidjson::Document::AllocatorType &allocator)
 
void json_utils::get_value (const rapidjson::Value &json_val, bool &value)
 
void json_utils::set_value (rapidjson::Value &json_val, const SQLTypes &value, rapidjson::Document::AllocatorType &allocator)
 
void json_utils::get_value (const rapidjson::Value &json_val, SQLTypes &value)
 
void json_utils::set_value (rapidjson::Value &json_val, const EncodingType &value, rapidjson::Document::AllocatorType &allocator)
 
void json_utils::get_value (const rapidjson::Value &json_val, EncodingType &value)
 
void json_utils::set_value (rapidjson::Value &json_obj, const shared::StringDictKey &dict_key, rapidjson::Document::AllocatorType &allocator)
 
void json_utils::get_value (const rapidjson::Value &json_obj, shared::StringDictKey &dict_key)
 
void json_utils::set_value (rapidjson::Value &json_val, const SQLTypeInfo &type_info, rapidjson::Document::AllocatorType &allocator)
 
template<typename T , typename MemberFunc >
void json_utils::get_value_from_object (const rapidjson::Value &json_val, MemberFunc mem_fn, SQLTypeInfo &type_info, const std::string &key)
 
void json_utils::get_value (const rapidjson::Value &json_val, SQLTypeInfo &type_info)
 
template<class T >
void json_utils::set_value (rapidjson::Value &json_val, const std::vector< T > &vector_value, rapidjson::Document::AllocatorType &allocator)
 
template<class T >
void json_utils::get_value (const rapidjson::Value &json_val, std::vector< T > &vector_value)
 
template<class T >
void json_utils::set_value (rapidjson::Value &json_val, const std::list< T > &list_value, rapidjson::Document::AllocatorType &allocator)
 
template<class T >
void json_utils::get_value (const rapidjson::Value &json_val, std::list< T > &list_value)
 
template<class T , class V >
void json_utils::set_value (rapidjson::Value &json_val, const std::vector< std::pair< T, V >> &vector_value, rapidjson::Document::AllocatorType &allocator)
 
template<class T , class V >
void json_utils::get_value (const rapidjson::Value &json_val, std::vector< std::pair< T, V >> &vector_value)
 
template<class T , class V >
void json_utils::set_value (rapidjson::Value &json_val, const std::list< std::pair< T, V >> &list_value, rapidjson::Document::AllocatorType &allocator)
 
template<class T , class V >
void json_utils::get_value (const rapidjson::Value &json_val, std::list< std::pair< T, V >> &list_value)
 
template<class T , class V >
void json_utils::set_value (rapidjson::Value &json_val, const std::map< T, V > &map_value, rapidjson::Document::AllocatorType &allocator)
 
template<class T , class V >
void json_utils::get_value (const rapidjson::Value &json_val, std::map< T, V > &map_value)
 
rapidjson::Document json_utils::read_from_file (const std::string &file_path)
 
void json_utils::write_to_file (const rapidjson::Document &document, const std::string &filepath)
 
std::string json_utils::write_to_string (const rapidjson::Document &document)