| 362 | }; |
| 363 | |
| 364 | String icinga::JsonEncode(const Value& value, bool prettify) |
| 365 | { |
| 366 | std::string output; |
| 367 | JsonEncoder encoder(output, prettify); |
| 368 | encoder.Encode(value); |
| 369 | return String(std::move(output)); |
| 370 | } |
| 371 | |
| 372 | /** |
| 373 | * Serializes an Icinga Value into a JSON object and writes it to the given output stream. |