1#include <xrpl/json/Output.h>
2#include <xrpl/json/json_reader.h>
3#include <xrpl/json/json_writer.h>
5#include <doctest/doctest.h>
12TEST_SUITE_BEGIN(
"JsonOutput");
24 CHECK(output == expected);
25 CHECK(output == valueDesc);
29TEST_CASE(
"output cases")
33 checkOutput(R
"([23,4.25,true,null,"string"])");
34 checkOutput(R"({"hello":"world"})");
37 checkOutput(R
"({"array":[{"12":23},{},null,false,0.5]})");
Outputs a Value in JSON format without formatting (not human friendly).
std::string write(Value const &root) override
Unserialize a JSON document into a Value.
JSON (JavaScript Object Notation).
Output stringOutput(std::string &s)
std::string jsonAsString(Json::Value const &)
Return the minimal string representation of a Json::Value in O(n) time.
void outputJson(Json::Value const &, Output const &)
Writes a minimal representation of a Json value to an Output in O(n) time.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.