| 2458 | } |
| 2459 | |
| 2460 | static void |
| 2461 | json_object_append (value& v, names&& ns, const variable* var) |
| 2462 | { |
| 2463 | using val_traits = value_traits<json_value>; |
| 2464 | using obj_traits = value_traits<json_object>; |
| 2465 | |
| 2466 | try |
| 2467 | { |
| 2468 | obj_traits::append (v, val_traits::convert (move (ns))); |
| 2469 | } |
| 2470 | catch (const invalid_argument& e) |
| 2471 | { |
| 2472 | // Note: ns is not guaranteed to be valid. |
| 2473 | // |
| 2474 | diag_record dr (fail); |
| 2475 | dr << "invalid json object"; |
| 2476 | |
| 2477 | if (var != nullptr) |
| 2478 | dr << " in variable " << var->name; |
| 2479 | |
| 2480 | dr << ": " << e; |
| 2481 | } |
| 2482 | } |
| 2483 | |
| 2484 | static void |
| 2485 | json_object_prepend (value& v, names&& ns, const variable* var) |
nothing calls this directly
no outgoing calls
no test coverage detected