Jpp  17.1.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Functions
JSON Namespace Reference

Classes

struct  JSon
 Auxiliary class to load json data from file. More...
 

Functions

void load (const std::string &file_name, json &object)
 Load json data from input file. More...
 
void store (const std::string &file_name, const json &object)
 Store json data to output file. More...
 

Detailed Description

Author
mdejong

Function Documentation

void JSON::load ( const std::string &  file_name,
json object 
)
inline

Load json data from input file.

Parameters
file_namefile name
objectjson data

Definition at line 28 of file JSon.hh.

29  {
30  using namespace std;
31 
32  ifstream in(file_name.c_str());
33 
34  in >> object;
35 
36  in.close();
37  }
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:46
void JSON::store ( const std::string &  file_name,
const json object 
)
inline

Store json data to output file.

Parameters
file_namefile name
objectjson data

Definition at line 46 of file JSon.hh.

47  {
48  using namespace std;
49 
50  ofstream out(file_name.c_str());
51 
52  out << setw(2) << setprecision(8) << object;
53 
54  out.close();
55  }