CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
JSON input/output.
Classes | |
class | CASM::jsonParser |
struct | CASM::jsonConstructor< ReturnType > |
Helper struct for constructing objects that need additional data. More... | |
struct | CASM::jsonMake< ValueType > |
Helper struct for constructing objects that need additional data. More... | |
class | CASM::jsonParserIterator< IsConst > |
Functions | |
std::ostream & | CASM::operator<< (std::ostream &stream, const jsonParser &json) |
std::istream & | CASM::operator>> (std::istream &stream, jsonParser &json) |
jsonParser & | CASM::to_json (bool value, jsonParser &json) |
To JSON for basic types. More... | |
jsonParser & | CASM::to_json (int value, jsonParser &json) |
jsonParser & | CASM::to_json (unsigned int value, jsonParser &json) |
jsonParser & | CASM::to_json (long int value, jsonParser &json) |
jsonParser & | CASM::to_json (unsigned long int value, jsonParser &json) |
jsonParser & | CASM::to_json (double value, jsonParser &json) |
jsonParser & | CASM::to_json (const std::string &value, jsonParser &json) |
jsonParser & | CASM::to_json (const char *value, jsonParser &json) |
jsonParser & | CASM::to_json (const jsonParser &value, jsonParser &json) |
template<typename T > | |
T | CASM::from_json (const jsonParser &json) |
From JSON for basic types. More... | |
template<typename T > | |
std::unique_ptr< T > | CASM::make_from_json (const jsonParser &json) |
Make from JSON for basic types. More... | |
template<> | |
bool | CASM::from_json< bool > (const jsonParser &json) |
template<> | |
int | CASM::from_json< int > (const jsonParser &json) |
template<> | |
unsigned int | CASM::from_json< unsigned int > (const jsonParser &json) |
template<> | |
long int | CASM::from_json< long int > (const jsonParser &json) |
template<> | |
unsigned long int | CASM::from_json< unsigned long int > (const jsonParser &json) |
template<> | |
double | CASM::from_json< double > (const jsonParser &json) |
template<> | |
std::string | CASM::from_json< std::string > (const jsonParser &json) |
template<> | |
jsonParser | CASM::from_json< jsonParser > (const jsonParser &json) |
void | CASM::from_json (bool &value, const jsonParser &json) |
From JSON for basic types. More... | |
void | CASM::from_json (int &value, const jsonParser &json) |
void | CASM::from_json (unsigned int &value, const jsonParser &json) |
void | CASM::from_json (long int &value, const jsonParser &json) |
void | CASM::from_json (unsigned long int &value, const jsonParser &json) |
void | CASM::from_json (double &value, const jsonParser &json) |
void | CASM::from_json (std::string &value, const jsonParser &json) |
void | CASM::from_json (jsonParser &value, const jsonParser &json) |
void | CASM::from_json (std::istream &stream, const jsonParser &json) |
void | CASM::from_json (fs::path &value, const jsonParser &json) |
void | CASM::to_json (std::istream &stream, jsonParser &json) |
Create a jsonParser from a stream. More... | |
void | CASM::to_json (fs::path file_path, jsonParser &json) |
Create a jsonParser by reading a file. More... | |
template<typename T > | |
jsonParser & | CASM::to_json (const std::complex< T > &value, jsonParser &json) |
To JSON for complex. More... | |
template<typename T > | |
void | CASM::from_json (std::complex< T > &value, const jsonParser &json) |
From JSON for complex. More... | |
template<typename Key , typename T > | |
jsonParser & | CASM::to_json (const std::pair< Key, T > &value, jsonParser &json) |
To JSON for std::pair<std::string, T> More... | |
template<typename Key , typename T > | |
void | CASM::from_json (std::pair< Key, T > &value, const jsonParser &json) |
From JSON for std::pair<std::string, T> More... | |
template<typename T , typename... Args> | |
void | CASM::make_from_json (std::unique_ptr< T > &ptr, const jsonParser &json, Args &&... args) |
Make from JSON for basic types. More... | |
fs::path | CASM::find_diff (const jsonParser &A, const jsonParser &B) |
Return the location at which jsonParser 'A' != 'B' as a fs::path. More... | |
fs::path | CASM::find_diff (const jsonParser &A, const jsonParser &B, double tol) |
template<typename T > | |
jsonParser | CASM::json_pair (const std::string &key, const T &value) |
Create pair/value json object without intermediate temporary. More... | |
template<typename T , typename... Args> | |
jsonParser & | CASM::jsonParser::push_back (const T &value, Args &&... args) |
template<typename T , typename... Args> | |
T | CASM::jsonParser::get (Args &&... args) const |
Get data from json, using one of several alternatives. More... | |
template<typename T , typename... Args> | |
void | CASM::jsonParser::get (T &t, Args &&... args) const |
template<typename T , typename... Args> | |
bool | CASM::jsonParser::get_if (T &t, const std::string &key, Args &&... args) const |
template<typename T , typename... Args> | |
T | CASM::jsonParser::get_if_else (const std::string &key, const T &default_value, Args &&... args) const |
template<typename T , typename... Args> | |
bool | CASM::jsonParser::get_else (T &t, const std::string &key, const T &default_value, Args &&... args) const |
template<typename T , typename... Args> | |
std::unique_ptr< T > | CASM::jsonParser::make (Args &&... args) const |
Get data from json. More... | |
template<typename T , typename... Args> | |
void | CASM::jsonParser::make (std::unique_ptr< T > &ptr, Args &&... args) const |
Get data from json. More... | |
template<typename T , typename... Args> | |
bool | CASM::jsonParser::make_if (std::unique_ptr< T > &ptr, const std::string &key, Args &&... args) const |
Get data from json if key exists. More... | |
template<typename T , typename... Args> | |
std::unique_ptr< T > | CASM::jsonParser::make_optional (const std::string &key, Args &&... args) const |
Get data from json if key exists, else return empty ptr. More... | |
template<typename T , typename... Args> | |
std::unique_ptr< T > | CASM::jsonParser::make_if_else (const std::string &key, std::unique_ptr< T > default_value, Args &&... args) const |
Get data from json if 'this' contains 'key', else return 'default_value'. More... | |
template<typename T , typename... Args> | |
bool | CASM::jsonParser::make_else (std::unique_ptr< T > &ptr, const std::string &key, std::unique_ptr< T > default_value, Args &&... args) const |
Get data from json if key exists, else assign default_value. More... | |
template<typename T > | |
jsonParser & | CASM::jsonParser::put (const T &value) |
template<typename Iterator > | |
jsonParser & | CASM::jsonParser::put_obj (Iterator begin, Iterator end) |
template<typename T > | |
jsonParser & | CASM::jsonParser::put_array (size_type N, const T &t) |
Puts new JSON array, using the same value. More... | |
template<typename Iterator , typename... Args, typename CASM_TMP::enable_if_iterator< Iterator >::type * = nullptr> | |
jsonParser & | CASM::jsonParser::put_array (Iterator begin, Iterator end, Args &&... args) |
Puts new JSON array, from iterators. More... | |
template<typename T > | |
jsonParser & | CASM::jsonParser::operator= (const T &value) |
template<typename K , typename V > | |
jsonParser & | CASM::to_json (const std::map< K, V > &map, jsonParser &json) |
Converts to a JSON object. More... | |
template<typename K , typename V > | |
void | CASM::from_json (std::map< K, V > &map, const jsonParser &json) |
template<typename T , typename... Args> | |
jsonParser & | CASM::to_json (const std::map< std::string, T > &map, jsonParser &json, Args &&... args) |
Converts to a JSON object. More... | |
template<typename T , typename... Args> | |
void | CASM::from_json (std::map< std::string, T > &map, const jsonParser &json, Args &&... args) |
template<typename T , typename... Args> | |
jsonParser & | CASM::to_json (const std::vector< T > &vec, jsonParser &json, Args &&... args) |
Converts to a JSON array. More... | |
template<typename T , typename... Args> | |
void | CASM::from_json (std::vector< T > &vec, const jsonParser &json, Args &&... args) |
template<typename T > | |
void | CASM::from_json (std::vector< T > &vec, const jsonParser &json, const T &initial) |
template<typename T , std::size_t N> | |
jsonParser & | CASM::to_json (const std::array< T, N > &arr, jsonParser &json) |
Converts to a JSON array. More... | |
template<typename T , std::size_t N> | |
void | CASM::from_json (std::array< T, N > &arr, const jsonParser &json) |
template<typename T , typename Compare > | |
jsonParser & | CASM::to_json (const std::set< T, Compare > &set, jsonParser &json) |
Converts to a JSON array. More... | |
template<typename T , typename Compare , typename... Args> | |
void | CASM::from_json (std::set< T, Compare > &set, const jsonParser &json, Args &&... args) |
template<typename T , typename Compare > | |
jsonParser & | CASM::to_json (const std::unordered_set< T, Compare > &set, jsonParser &json) |
Converts to a JSON array. More... | |
template<typename T , typename Compare , typename... Args> | |
void | CASM::from_json (std::unordered_set< T, Compare > &set, const jsonParser &json, Args &&... args) |
template<typename Derived > | |
CASM::jsonParser & | CASM::to_json (const Eigen::MatrixBase< Derived > &value, CASM::jsonParser &json) |
Write Eigen Matrix/Vector to JSON. More... | |
template<typename Derived > | |
CASM::jsonParser & | CASM::to_json (const Eigen::MatrixBase< Derived > &value, CASM::jsonParser &json, CASM::jsonParser::as_array) |
Write Eigen Matrix/Vector to JSON. More... | |
template<typename Derived > | |
CASM::jsonParser & | CASM::to_json (const Eigen::MatrixBase< Derived > &value, CASM::jsonParser &json, CASM::jsonParser::as_flattest) |
Write Eigen Matrix/Vector to JSON. More... | |
template<typename Derived > | |
CASM::jsonParser & | CASM::to_json_array (const Eigen::MatrixBase< Derived > &value, CASM::jsonParser &json) |
Write Eigen Matrix with 1 row or 1 column to JSON array. More... | |
template<typename Derived > | |
CASM::jsonParser | CASM::to_json_array (const Eigen::MatrixBase< Derived > &value) |
Write Eigen Matrix with 1 row or 1 column to JSON array. More... | |
template<typename Derived > | |
void | CASM::from_json (Eigen::MatrixBase< Derived > &value, const CASM::jsonParser &json) |
Read Eigen Matrix/Vector from JSON. More... | |
fs::path CASM::find_diff | ( | const jsonParser & | A, |
const jsonParser & | B | ||
) |
Return the location at which jsonParser 'A' != 'B' as a fs::path.
Return the location at which jsonParser 'A' != 'B' as a boost::filesystem::path
Definition at line 475 of file jsonParser.cc.
fs::path CASM::find_diff | ( | const jsonParser & | A, |
const jsonParser & | B, | ||
double | tol | ||
) |
Return the location at which jsonParser !A.almost_equal(B, tol) as a boost::filesystem::path
Return the location at which jsonParser !A.almost_equal(B, tol) as a fs::path
Definition at line 481 of file jsonParser.cc.
void CASM::from_json | ( | bool & | value, |
const jsonParser & | json | ||
) |
From JSON for basic types.
Definition at line 120 of file jsonParser.cc.
T CASM::from_json | ( | const jsonParser & | json | ) |
From JSON for basic types.
Default works if T::T() and 'void from_json(T&, const jsonParser&)' exist.
Definition at line 574 of file jsonParser.hh.
void CASM::from_json | ( | double & | value, |
const jsonParser & | json | ||
) |
Definition at line 136 of file jsonParser.cc.
void CASM::from_json | ( | Eigen::MatrixBase< Derived > & | value, |
const CASM::jsonParser & | json | ||
) |
Read Eigen Matrix/Vector from JSON.
Definition at line 331 of file json_io.hh.
void CASM::from_json | ( | fs::path & | value, |
const jsonParser & | json | ||
) |
Definition at line 162 of file jsonParser.cc.
void CASM::from_json | ( | int & | value, |
const jsonParser & | json | ||
) |
Definition at line 122 of file jsonParser.cc.
void CASM::from_json | ( | jsonParser & | value, |
const jsonParser & | json | ||
) |
Definition at line 160 of file jsonParser.cc.
void CASM::from_json | ( | long int & | value, |
const jsonParser & | json | ||
) |
Definition at line 128 of file jsonParser.cc.
void CASM::from_json | ( | std::array< T, N > & | arr, |
const jsonParser & | json | ||
) |
void CASM::from_json | ( | std::complex< T > & | value, |
const jsonParser & | json | ||
) |
void CASM::from_json | ( | std::istream & | stream, |
const jsonParser & | json | ||
) |
void CASM::from_json | ( | std::map< K, V > & | map, |
const jsonParser & | json | ||
) |
void CASM::from_json | ( | std::map< std::string, T > & | map, |
const jsonParser & | json, | ||
Args &&... | args | ||
) |
void CASM::from_json | ( | std::pair< Key, T > & | value, |
const jsonParser & | json | ||
) |
From JSON for std::pair<std::string, T>
Definition at line 952 of file jsonParser.hh.
void CASM::from_json | ( | std::set< T, Compare > & | set, |
const jsonParser & | json, | ||
Args &&... | args | ||
) |
Read std::set from JSON array
Clears any previous contents, constructs via jsonConstructor<T>
Definition at line 225 of file json_io.hh.
void CASM::from_json | ( | std::string & | value, |
const jsonParser & | json | ||
) |
Definition at line 156 of file jsonParser.cc.
void CASM::from_json | ( | std::unordered_set< T, Compare > & | set, |
const jsonParser & | json, | ||
Args &&... | args | ||
) |
Read std::set from JSON array
Clears any previous contents, constructs via jsonConstructor<T>
Definition at line 246 of file json_io.hh.
void CASM::from_json | ( | std::vector< T > & | vec, |
const jsonParser & | json, | ||
Args &&... | args | ||
) |
Read std::vector<T> from JSON
Clears any previous contents
Definition at line 158 of file json_io.hh.
void CASM::from_json | ( | std::vector< T > & | vec, |
const jsonParser & | json, | ||
const T & | initial | ||
) |
Read std::vector<T> from JSON
Clears any previous contents
Definition at line 178 of file json_io.hh.
void CASM::from_json | ( | unsigned int & | value, |
const jsonParser & | json | ||
) |
Definition at line 124 of file jsonParser.cc.
void CASM::from_json | ( | unsigned long int & | value, |
const jsonParser & | json | ||
) |
Definition at line 132 of file jsonParser.cc.
bool CASM::from_json< bool > | ( | const jsonParser & | json | ) |
Definition at line 79 of file jsonParser.cc.
double CASM::from_json< double > | ( | const jsonParser & | json | ) |
Definition at line 104 of file jsonParser.cc.
int CASM::from_json< int > | ( | const jsonParser & | json | ) |
Definition at line 84 of file jsonParser.cc.
jsonParser CASM::from_json< jsonParser > | ( | const jsonParser & | json | ) |
Definition at line 116 of file jsonParser.cc.
long int CASM::from_json< long int > | ( | const jsonParser & | json | ) |
Definition at line 94 of file jsonParser.cc.
std::string CASM::from_json< std::string > | ( | const jsonParser & | json | ) |
Definition at line 111 of file jsonParser.cc.
unsigned int CASM::from_json< unsigned int > | ( | const jsonParser & | json | ) |
Definition at line 89 of file jsonParser.cc.
unsigned long int CASM::from_json< unsigned long int > | ( | const jsonParser & | json | ) |
Definition at line 99 of file jsonParser.cc.
T CASM::jsonParser::get | ( | Args &&... | args | ) | const |
Get data from json, using one of several alternatives.
Get data from json, using one of several alternatives
Use for any type T for which the either of the following is specialized (they are called in the following order):
Definition at line 716 of file jsonParser.hh.
void CASM::jsonParser::get | ( | T & | t, |
Args &&... | args | ||
) | const |
Get data from json, for any type T for which 'void from_json( T &value, const jsonParser &json, Args... args)' is defined Call using: T t; json.get(t);
Get data from json
This is equivalent to:
Definition at line 728 of file jsonParser.hh.
bool CASM::jsonParser::get_else | ( | T & | t, |
const std::string & | key, | ||
const T & | default_value, | ||
Args &&... | args | ||
) | const |
Get data from json, if 'this' contains 'key', else set to 'default_value' Returns true if 'key' found, else false
Get data from json if key exists, else assign default_value
If 'key' exists, this is equivalent to:
Definition at line 775 of file jsonParser.hh.
bool CASM::jsonParser::get_if | ( | T & | t, |
const std::string & | key, | ||
Args &&... | args | ||
) | const |
Get data from json, if 'this' contains 'key' Returns true if 'key' found, else false
Get data from json if key exists
If 'key' exists, this is equivalent to:
Definition at line 740 of file jsonParser.hh.
T CASM::jsonParser::get_if_else | ( | const std::string & | key, |
const T & | default_value, | ||
Args &&... | args | ||
) | const |
Get data from json, if 'this' contains 'key', else return to 'default_value'
Get data from json if key exists, else return default_value
If 'key' exists, this is equivalent to:
Definition at line 757 of file jsonParser.hh.
jsonParser CASM::json_pair | ( | const std::string & | key, |
const T & | value | ||
) |
Create pair/value json object without intermediate temporary.
Definition at line 959 of file jsonParser.hh.
std::unique_ptr< T > CASM::jsonParser::make | ( | Args &&... | args | ) | const |
Get data from json.
Get data from json, using one of several alternatives
Use for any type T for which the either of the following is specialized (they are called in the following order):
Definition at line 806 of file jsonParser.hh.
void CASM::jsonParser::make | ( | std::unique_ptr< T > & | ptr, |
Args &&... | args | ||
) | const |
Get data from json.
Get data from json
This is equivalent to:
Definition at line 818 of file jsonParser.hh.
bool CASM::jsonParser::make_else | ( | std::unique_ptr< T > & | ptr, |
const std::string & | key, | ||
std::unique_ptr< T > | default_value, | ||
Args &&... | args | ||
) | const |
Get data from json if key exists, else assign default_value.
Get data from json if key exists, else assign default_value
If 'key' exists, this is equivalent to:
Definition at line 883 of file jsonParser.hh.
std::unique_ptr< T > CASM::make_from_json | ( | const jsonParser & | json | ) |
Make from JSON for basic types.
Default uses 'from_json<T>(const jsonParser&)' with copy constructor.
Definition at line 582 of file jsonParser.hh.
void CASM::make_from_json | ( | std::unique_ptr< T > & | ptr, |
const jsonParser & | json, | ||
Args &&... | args | ||
) |
Make from JSON for basic types.
Definition at line 594 of file jsonParser.hh.
bool CASM::jsonParser::make_if | ( | std::unique_ptr< T > & | ptr, |
const std::string & | key, | ||
Args &&... | args | ||
) | const |
Get data from json if key exists.
Get data from json if key exists
If 'key' exists, this is equivalent to:
Definition at line 830 of file jsonParser.hh.
std::unique_ptr< T > CASM::jsonParser::make_if_else | ( | const std::string & | key, |
std::unique_ptr< T > | default_value, | ||
Args &&... | args | ||
) | const |
Get data from json if 'this' contains 'key', else return 'default_value'.
Get data from json if 'this' contains 'key', else return 'default_value'
If 'key' exists, this is equivalent to:
Definition at line 865 of file jsonParser.hh.
std::unique_ptr< T > CASM::jsonParser::make_optional | ( | const std::string & | key, |
Args &&... | args | ||
) | const |
Get data from json if key exists, else return empty ptr.
Get data from json if key exists, else return empty ptr
If 'key' exists, this is equivalent to:
Definition at line 848 of file jsonParser.hh.
std::ostream & CASM::operator<< | ( | std::ostream & | stream, |
const jsonParser & | json | ||
) |
Definition at line 213 of file jsonParser.cc.
jsonParser & CASM::jsonParser::operator= | ( | const T & | value | ) |
Puts data of any type T for which 'jsonParser& to_json( const T &value, jsonParser &json)' is defined
Definition at line 939 of file jsonParser.hh.
std::istream & CASM::operator>> | ( | std::istream & | stream, |
jsonParser & | json | ||
) |
Definition at line 177 of file jsonParser.cc.
jsonParser & CASM::jsonParser::push_back | ( | const T & | value, |
Args &&... | args | ||
) |
Puts new valued element at end of array of any type T for which 'jsonParser& to_json( const T &value, jsonParser &json)' is defined
re-throw exceptions
Definition at line 684 of file jsonParser.hh.
jsonParser & CASM::jsonParser::put | ( | const T & | value | ) |
Puts data of any type T for which 'jsonParser& to_json( const T &value, jsonParser &json)' is defined (same as 'operator=')
Puts data of any type T for which 'jsonParser& to_json( const T &value, jsonParser &json)' is defined (same as operator=)
Definition at line 899 of file jsonParser.hh.
jsonParser & CASM::jsonParser::put_array | ( | Iterator | begin, |
Iterator | end, | ||
Args &&... | args | ||
) |
Puts new JSON array, from iterators.
Definition at line 927 of file jsonParser.hh.
jsonParser & CASM::jsonParser::put_array | ( | size_type | N, |
const T & | t | ||
) |
Puts new JSON array, using the same value.
Definition at line 916 of file jsonParser.hh.
jsonParser & CASM::jsonParser::put_obj | ( | Iterator | begin, |
Iterator | end | ||
) |
Puts new JSON object, from iterators over a range of values of type std::pair<std::string, T>
Definition at line 906 of file jsonParser.hh.
jsonParser & CASM::to_json | ( | bool | value, |
jsonParser & | json | ||
) |
To JSON for basic types.
Functions for converting basic types to/from json.
Definition at line 12 of file jsonParser.cc.
jsonParser & CASM::to_json | ( | const char * | value, |
jsonParser & | json | ||
) |
Definition at line 55 of file jsonParser.cc.
CASM::jsonParser& CASM::to_json | ( | const Eigen::MatrixBase< Derived > & | value, |
CASM::jsonParser & | json | ||
) |
Write Eigen Matrix/Vector to JSON.
Definition at line 259 of file json_io.hh.
CASM::jsonParser& CASM::to_json | ( | const Eigen::MatrixBase< Derived > & | value, |
CASM::jsonParser & | json, | ||
CASM::jsonParser::as_array | |||
) |
Write Eigen Matrix/Vector to JSON.
Definition at line 275 of file json_io.hh.
CASM::jsonParser& CASM::to_json | ( | const Eigen::MatrixBase< Derived > & | value, |
CASM::jsonParser & | json, | ||
CASM::jsonParser::as_flattest | |||
) |
Write Eigen Matrix/Vector to JSON.
Definition at line 294 of file json_io.hh.
jsonParser & CASM::to_json | ( | const jsonParser & | value, |
jsonParser & | json | ||
) |
Definition at line 60 of file jsonParser.cc.
jsonParser& CASM::to_json | ( | const std::array< T, N > & | arr, |
jsonParser & | json | ||
) |
Converts to a JSON array.
Definition at line 190 of file json_io.hh.
jsonParser& CASM::to_json | ( | const std::complex< T > & | value, |
jsonParser & | json | ||
) |
To JSON for complex.
Definition at line 514 of file jsonParser.hh.
jsonParser& CASM::to_json | ( | const std::map< K, V > & | map, |
jsonParser & | json | ||
) |
Converts to a JSON object.
Definition at line 101 of file json_io.hh.
jsonParser& CASM::to_json | ( | const std::map< std::string, T > & | map, |
jsonParser & | json, | ||
Args &&... | args | ||
) |
Converts to a JSON object.
Definition at line 128 of file json_io.hh.
jsonParser & CASM::to_json | ( | const std::pair< Key, T > & | value, |
jsonParser & | json | ||
) |
To JSON for std::pair<std::string, T>
To JSON for std::pair<std::string, T> and other convertible types.
Definition at line 945 of file jsonParser.hh.
jsonParser& CASM::to_json | ( | const std::set< T, Compare > & | set, |
jsonParser & | json | ||
) |
Converts to a JSON array.
Definition at line 217 of file json_io.hh.
jsonParser & CASM::to_json | ( | const std::string & | value, |
jsonParser & | json | ||
) |
Definition at line 50 of file jsonParser.cc.
jsonParser& CASM::to_json | ( | const std::unordered_set< T, Compare > & | set, |
jsonParser & | json | ||
) |
Converts to a JSON array.
Definition at line 237 of file json_io.hh.
jsonParser& CASM::to_json | ( | const std::vector< T > & | vec, |
jsonParser & | json, | ||
Args &&... | args | ||
) |
Converts to a JSON array.
Definition at line 149 of file json_io.hh.
jsonParser & CASM::to_json | ( | double | value, |
jsonParser & | json | ||
) |
Definition at line 37 of file jsonParser.cc.
void CASM::to_json | ( | fs::path | file_path, |
jsonParser & | json | ||
) |
Create a jsonParser by reading a file.
Create a jsonParser by reading a file
This function reads the contents of the file at 'file_path' as if it were JSON. Use 'to_json(file_path.string(), json)' if you only want the path as a string
Definition at line 69 of file jsonParser.cc.
jsonParser & CASM::to_json | ( | int | value, |
jsonParser & | json | ||
) |
Definition at line 17 of file jsonParser.cc.
jsonParser & CASM::to_json | ( | long int | value, |
jsonParser & | json | ||
) |
Definition at line 27 of file jsonParser.cc.
|
inline |
Create a jsonParser from a stream.
Definition at line 501 of file jsonParser.hh.
jsonParser & CASM::to_json | ( | unsigned int | value, |
jsonParser & | json | ||
) |
Definition at line 22 of file jsonParser.cc.
jsonParser & CASM::to_json | ( | unsigned long int | value, |
jsonParser & | json | ||
) |
Definition at line 32 of file jsonParser.cc.
CASM::jsonParser CASM::to_json_array | ( | const Eigen::MatrixBase< Derived > & | value | ) |
Write Eigen Matrix with 1 row or 1 column to JSON array.
Definition at line 321 of file json_io.hh.
CASM::jsonParser& CASM::to_json_array | ( | const Eigen::MatrixBase< Derived > & | value, |
CASM::jsonParser & | json | ||
) |
Write Eigen Matrix with 1 row or 1 column to JSON array.
Definition at line 313 of file json_io.hh.