20#include <test/json/TestOutputSuite.h>
22#include <xrpl/json/json_reader.h>
23#include <xrpl/json/json_writer.h>
56 runTest(
"array",
"[23,4.25,true,null,\"string\"]");
57 runTest(
"dict",
"{\"hello\":\"world\"}");
60 runTest(
"more complex",
"{\"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.
void expectResult(std::string const &expected, std::string const &message="")
void setup(std::string const &testName)
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.
void runTest(std::string const &name)
void runTest(std::string const &name, std::string const &valueDesc)
void run() override
Runs the suite.