| 120 | } |
| 121 | |
| 122 | void ckpt_json_get_int(struct ParseState* Parser, struct Value* ReturnValue, struct Value** Param, int NumArgs) |
| 123 | { |
| 124 | const ScriptArgs args(Parser, Param, NumArgs, "json_get_int"); |
| 125 | nlohmann::json* get = tree(args, 0); |
| 126 | if (!get->is_number()) { |
| 127 | args.fail("argument 1 is not a number"); |
| 128 | } |
| 129 | ReturnValue->Val->Integer = get->get<int>(); |
| 130 | } |
| 131 | |
| 132 | void ckpt_json_get_bool(struct ParseState* Parser, struct Value* ReturnValue, struct Value** Param, int NumArgs) |
| 133 | { |