Given a path (absolute or relative) to a file that contains a JSON-encoded ABI, return the parsed ABI
11 {
14 if (abi_path.is_relative()) {
15 abi_path = data_dir / abi_path;
16 }
17
19 try {
21 }
SYS_RETHROW_EXCEPTIONS(chain::json_parse_exception,
"Fail to parse JSON from file: ${file}", (
"file", abi_path.generic_string()));
22
25 return result;
26 }
#define SYS_ASSERT(expr, exc_type, FORMAT,...)
#define SYS_RETHROW_EXCEPTIONS(exception_type, FORMAT,...)
static variant from_file(const fc::path &p, const parse_type ptype=parse_type::legacy_parser, const uint32_t max_depth=DEFAULT_MAX_RECURSION_DEPTH)
wraps boost::filesystem::path to provide platform independent path manipulation.
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
bool exists(const path &p)
bool is_directory(const path &p)
void from_variant(const fc::variant &v, sysio::chain::chain_id_type &cid)