20 #include <ripple/beast/unit_test.h> 
   21 #include <ripple/json/Writer.h> 
   22 #include <ripple/json/json_writer.h> 
   23 #include <test/json/TestOutputSuite.h> 
   41         setup(
"near trivial");
 
   87         setup(
"empty object");
 
  104         setup(
"backslash and quote");
 
  108         setup(
"escape embedded");
 
  110         expectResult(
"\"this contains a \\\\ in the middle of it.\"");
 
  112         setup(
"remaining escapes");
 
  120         setup(
"empty array");
 
  142         setup(
"embedded array simple");
 
  164         setup(
"complex object");
 
  180             "{\"hello\":\"world\",\"array\":[true,12," 
  181             "[{\"goodbye\":\"cruel world.\"," 
  182             "\"subarray\":[23.5]}]]}");
 
  
void setup(std::string const &testName)
void append(Scalar t)
Append a value to an array.
void finish()
Finish the collection most recently started.
BEAST_DEFINE_TESTSUITE(JsonObject, ripple_basics, ripple)
void set(std::string const &tag, Type t)
Add a key, value assignment to an object.
void startAppend(CollectionType)
Start a new collection inside an array.
void startRoot(CollectionType)
Start a new collection at the root level.
void finishAll()
Finish all objects and arrays.
JSON (JavaScript Object Notation).
@ objectValue
object value (collection of name/value pairs).
void testEmbeddedArraySimple()
std::unique_ptr< Json::Writer > writer_
void startSet(CollectionType, std::string const &key)
Start a new collection inside an object.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void expectResult(std::string const &expected, std::string const &message="")
void output(std::string const &)