CoolProp  6.6.1dev
An open-source fluid property and humid air property database
Classes | Namespaces | Enumerations | Functions
rapidjson_include.h File Reference
#include "Exceptions.h"
#include "CoolPropTools.h"
#include "externals/rapidjson/include/rapidjson/rapidjson.h"
#include "externals/rapidjson/include/rapidjson/document.h"
#include "externals/rapidjson/include/rapidjson/filewritestream.h"
#include "externals/rapidjson/include/rapidjson/prettywriter.h"
#include "externals/rapidjson/include/rapidjson/stringbuffer.h"
#include "externals/rapidjson/include/rapidjson/schema.h"
#include <cassert>

Go to the source code of this file.

Classes

struct  cpjson::value_information
 

Namespaces

 cpjson
 

Enumerations

enum  cpjson::schema_validation_code { cpjson::SCHEMA_VALIDATION_OK = 0 , cpjson::SCHEMA_INVALID_JSON , cpjson::INPUT_INVALID_JSON , cpjson::SCHEMA_NOT_VALIDATED }
 

Functions

void cpjson::JSON_string_to_rapidjson (const std::string &JSON_string, rapidjson::Document &doc)
 Convert a JSON-formatted string to a rapidjson::Document object. More...
 
value_information cpjson::get_information (rapidjson::Value &v)
 
std::string cpjson::json2string (const rapidjson::Value &v)
 
int cpjson::get_integer (const rapidjson::Value &v, std::string m)
 A convenience function to get a double from a JSON value, including error checking. More...
 
double cpjson::get_double (const rapidjson::Value &v, std::string m)
 A convenience function to get a double from a JSON value, including error checking. More...
 
bool cpjson::get_bool (const rapidjson::Value &v, std::string m)
 A convenience function to get a bool from a JSON value, including error checking. More...
 
std::string cpjson::get_string (const rapidjson::Value &v, std::string m)
 A convenience function to get a string from a JSON value, including error checking. More...
 
std::vector< double > cpjson::get_double_array (const rapidjson::Value &v)
 A convenience function to get a double array compactly. More...
 
std::vector< double > cpjson::get_double_array (const rapidjson::Value &v, std::string m)
 A convenience function to get a double array compactly. More...
 
std::vector< CoolPropDblcpjson::get_long_double_array (const rapidjson::Value &v)
 A convenience function to get a long double array compactly. More...
 
std::vector< std::vector< double > > cpjson::get_double_array2D (const rapidjson::Value &v)
 A convenience function to get a 2D double array compactly. More...
 
std::vector< std::vector< CoolPropDbl > > cpjson::get_long_double_array2D (const rapidjson::Value &v)
 A convenience function to get a 2D long double array compactly. More...
 
std::vector< CoolPropDblcpjson::get_long_double_array (const rapidjson::Value &v, std::string name)
 A convenience function to get a long double array compactly. More...
 
std::vector< std::string > cpjson::get_string_array (const rapidjson::Value &v)
 A convenience function to get a string array compactly. More...
 
std::vector< std::string > cpjson::get_string_array (const rapidjson::Value &v, std::string m)
 A convenience function to get a string array compactly. More...
 
template<typename T >
std::string cpjson::to_string (const T &v)
 A convenience function to get a std::string from a JSON value. More...
 
void cpjson::set_double_array2D (const char *key, const std::vector< std::vector< double >> &vec, rapidjson::Value &value, rapidjson::Document &doc)
 A convenience function to set a 2D array of double compactly. More...
 
void cpjson::set_string (const std::string &key, const std::string &s, rapidjson::Value &value, rapidjson::Document &doc)
 A convenience function to set a string compactly. More...
 
void cpjson::set_string_array (const char *key, const std::vector< std::string > &vec, rapidjson::Value &value, rapidjson::Document &doc)
 A convenience function to set a string array compactly. More...
 
void cpjson::set_int_array (const char *key, const std::vector< int > &vec, rapidjson::Value &value, rapidjson::Document &doc)
 A convenience function to set an integer array compactly. More...
 
void cpjson::set_double_array (const char *key, const std::vector< double > &vec, rapidjson::Value &value, rapidjson::Document &doc)
 A convenience function to set a double array compactly. More...
 
void cpjson::set_long_double_array (const char *const key, const std::vector< CoolPropDbl > &vec, rapidjson::Value &value, rapidjson::Document &doc)
 A convenience function to set a double array compactly. More...
 
schema_validation_code cpjson::validate_schema (const std::string &schemaJson, const std::string &inputJson, std::string &errstr)