mirror of
https://codeberg.org/vyn/rei-json.git
synced 2025-07-02 01:43:19 +00:00
Add Exceptions indicating which line contains error when parsing JSON
This commit is contained in:
parent
fd034eff71
commit
2639dba60a
9 changed files with 307 additions and 177 deletions
|
@ -25,7 +25,7 @@ TEST_CASE("Parsing json object") {
|
|||
"keyString": "YEP"
|
||||
})";
|
||||
auto json = rei::json::parse(jsonStr);
|
||||
auto& objectJson = std::get<rei::json::JsonObject>(json);
|
||||
auto& objectJson = json.asObject();
|
||||
|
||||
REQUIRE(objectJson.getNumber("keyPositiveNumber") == 12);
|
||||
REQUIRE(objectJson.getNumber("keyNegativeNumber") == -13);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue