| 920 | } |
| 921 | |
| 922 | void JsonValue::read_array(size_t level, StreamContext &ctx) { |
| 923 | if (level > 100) |
| 924 | ctx.throw_error("Depth too big"); |
| 925 | JsonValue::Array value; |
| 926 | char c = ctx.peek_non_ws_char(); |
| 927 | |
| 928 | if (c == ']') |
| 929 | ctx.read_non_ws_char(); |
| 930 | else { |
| 931 | for (;;) { |
| 932 | value.resize(value.size() + 1); |
| 933 | value.back().read_json(level, ctx); |
| 934 | c = ctx.read_non_ws_char(); |
| 935 | |
| 936 | if (c == ']') |
| 937 | break; |
| 938 | ctx.expect(c, ','); |
| 939 | } |
| 940 | } |
| 941 | |
| 942 | *this = std::move(value); |
| 943 | } |
| 944 | |
| 945 | void JsonValue::read_true(StreamContext &ctx) { |
| 946 | char data[3]{ctx.read_char(), ctx.read_char(), ctx.read_char()}; |
nothing calls this directly
no test coverage detected