26 const jsont &arguments =
json[
"arguments"];
30 "array expected",
"'arguments'");
38 "string expected",
"argument");
48 "array expected",
"'options'");
69 if(element.is_string())
81 "unrecognized commandline option format",
83 "Boolean, string, number, or string array expected");
90 if(cmdline.
isset(
"json-interface"))
101 "JSON object expected at top-level",
"command-line JSON input");
109 cmdline.
set(
"json-ui");
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
virtual bool isset(char option) const
virtual void set(const std::string &option, bool value=true)
Set option option to value, or true if the value is omitted.
Thrown when users pass incorrect command line arguments, for example passing no files to analysis or ...
std::string what() const override
A human readable description of what went wrong.
Class that provides messages with a built-in verbosity 'level'.
json_objectt & to_json_object(jsont &json)
json_arrayt & to_json_array(jsont &json)
static void get_json_options(const json_objectt &json, cmdlinet &cmdline)
Parse commandline options from json into cmdline.
void json_interface(cmdlinet &cmdline, message_handlert &message_handler)
Parses the JSON-formatted command line from stdin.
JSON Commandline Interface.
bool parse_json(std::istream &in, const std::string &filename, message_handlert &message_handler, jsont &dest)
static void json(json_objectT &result, const irep_idt &property_id, const property_infot &property_info)