20#include <xrpl/json/Output.h>
21#include <xrpl/json/json_reader.h>
22#include <xrpl/json/json_writer.h>
24#include <doctest/doctest.h>
31TEST_SUITE_BEGIN(
"JsonOutput");
43 CHECK(output == expected);
44 CHECK(output == valueDesc);
48TEST_CASE(
"output cases")
52 checkOutput(R
"([23,4.25,true,null,"string"])");
53 checkOutput(R"({"hello":"world"})");
56 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.