| 86 | } |
| 87 | |
| 88 | void erase3() |
| 89 | { |
| 90 | try |
| 91 | { |
| 92 | // Read from input file |
| 93 | std::istringstream is(input); |
| 94 | json instance = json::parse(is); |
| 95 | |
| 96 | // Remove first record identified by JSONPointer |
| 97 | jsonpointer::remove(instance, "/0"); |
| 98 | |
| 99 | // Write to output file |
| 100 | std::ostringstream os; |
| 101 | instance.dump_pretty(os); |
| 102 | std::cout << os.str() << "\n\n"; |
| 103 | } |
| 104 | catch (const std::exception& e) |
| 105 | { |
| 106 | std::cout << e.what() << '\n'; |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | int main() |
| 111 | { |