18 #ifndef WIRECELL_PERSIST 19 #define WIRECELL_PERSIST 21 #include <json/json.h> 22 #include "libjsonnet++.h" 23 #include <boost/filesystem.hpp> 116 template <
typename Iterable>
119 for (
auto&& element: cont) {
std::string evaluate_jsonnet_file(const std::string &filename, const externalvars_t &extvar=externalvars_t(), const externalvars_t &extcode=externalvars_t())
std::string resolve(const std::string &filename)
Below is a reimplimenatiaon of the above but in class form..... /.
std::vector< boost::filesystem::path > m_load_paths
std::vector< std::string > pathlist_t
std::string dumps(const Json::Value &top, bool pretty=false)
As above but dump to a JSON text string.
std::string evaluate_jsonnet_text(const std::string &text, const externalvars_t &extvar=externalvars_t(), const externalvars_t &extcode=externalvars_t())
Json::Value json2object(const std::string &text)
std::map< std::string, std::string > externalvars_t
Parser(const pathlist_t &load_paths=pathlist_t(), const externalvars_t &extvar=externalvars_t(), const externalvars_t &extcode=externalvars_t())
GenericValue< UTF8<> > Value
GenericValue with UTF8 encoding.
Json::Value load(const std::string &filename, const externalvars_t &extvar=externalvars_t(), const externalvars_t &extcode=externalvars_t())
bool exists(const std::string &filename)
Return true file exists (no file resolution performed).
Json::Value loads(const std::string &text, const externalvars_t &extvar=externalvars_t(), const externalvars_t &extcode=externalvars_t())
Json::Value load(const std::string &filename)
void dump(const std::string &filename, const Json::Value &top, bool pretty=false)
jsonnet::Jsonnet m_jsonnet
std::string slurp(const std::string &filename)
std::string resolve(const std::string &filename)
Json::Value loads(const std::string &text)
Json::Value iterable2json(Iterable const &cont)