20 #include <ripple/json/json_reader.h>
21 #include <ripple/json/json_writer.h>
22 #include <test/json/TestOutputSuite.h>
55 runTest(
"array",
"[23,4.25,true,null,\"string\"]");
56 runTest(
"dict",
"{\"hello\":\"world\"}");
59 runTest(
"more complex",
"{\"array\":[{\"12\":23},{},null,false,0.5]}");
void setup(std::string const &testName)
void runTest(std::string const &name, std::string const &valueDesc)
std::string jsonAsString(Json::Value const &value)
Return the minimal string representation of a Json::Value in O(n) time.
BEAST_DEFINE_TESTSUITE(JsonObject, ripple_basics, ripple)
Unserialize a JSON document into a Value.
void outputJson(Json::Value const &value, Output const &out)
Writes a minimal representation of a Json value to an Output in O(n) time.
JSON (JavaScript Object Notation).
void runTest(std::string const &name)
std::string write(const Value &root) override
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void expectResult(std::string const &expected, std::string const &message="")
Outputs a Value in JSON format without formatting (not human friendly).
Output stringOutput(std::string &s)
std::function< void(boost::beast::string_view const &)> Output