15 #include "libjsonnet.h" 34 preprocessor_->vm_ = static_cast<struct JsonnetVm *>(::jsonnet_make());
35 ARILES_ASSERT(NULL !=
preprocessor_->vm_,
"Could not initialize jsonnet preprocessor.");
48 const char *jsonnet_output = ::jsonnet_evaluate_file(
preprocessor_->vm_, file_name.c_str(), &error);
49 ARILES_ASSERT(0 == error, jsonnet_output);
50 return (jsonnet_output);
57 const char *jsonnet_output =
58 ::jsonnet_evaluate_snippet(
preprocessor_->vm_,
"<input steam>", input_string.c_str(), &error);
59 ARILES_ASSERT(0 == error, jsonnet_output);
60 return (jsonnet_output);
const char * fromFile(const std::string &file_name)
const char * fromString(const std::string &input_string)
JsonnetPreprocessorPtr preprocessor_
ARILES_SHARED_PTR< JsonnetPreprocessor > JsonnetPreprocessorPtr
class ARILES_VISIBILITY_ATTRIBUTE JsonnetPreprocessor
#define ARILES_VISIBILITY_ATTRIBUTE