| … | … | @@ -607,6 +607,11 @@ ValuePtr Json::decode_value(const std::string& s, |
| 607 | 607 | { |
| 608 | 608 | l++; |
| 609 | 609 | ValuePtr vp = decode_value(s, l, r); |
| 610 | ||
| 611 | // Bad clients can (and do) send mal-formed JSON. | |
| 612 | // This includes the empty list [] and expressions | |
| 613 | // with a trailing comma. Skip out of those. | |
| 614 | if (nullptr == vp) break; | |
| 610 | 615 | vv.push_back(vp); |
| 611 | 616 | |
| 612 | 617 | // Get to the next elt |