3#include <xrpl/basics/contract.h> 
    4#include <xrpl/beast/unit_test.h> 
    5#include <xrpl/json/json_reader.h>        
    6#include <xrpl/protocol/ErrorCodes.h>     
    7#include <xrpl/protocol/STParsedJSON.h>   
   11namespace InnerObjectFormatsUnitTestDetail {
 
   23    "Account" : "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd", 
   29                "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA", 
   36                "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux", 
   42    "TransactionType" : "SignerListSet" 
   48    "Account" : "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd", 
   54                "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA", 
   66    "TransactionType" : "SignerListSet" 
   72    "Account" : "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd", 
   78                "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA", 
   85                "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux", 
   90    "TransactionType" : "SignerListSet" 
   96    "Account" : "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd", 
  102                "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA", 
  109                "Amount" : "1000000", 
  110                "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux", 
  116    "TransactionType" : "SignerListSet" 
  122    "Account" : "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd", 
  128                "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA", 
  135                "Amount" : "10000000", 
  141    "TransactionType" : "SignerListSet" 
 
 
  155        using namespace InnerObjectFormatsUnitTestDetail;
 
  160        for (
auto const& test : testArray)
 
  166                Throw<std::runtime_error>(
 
  167                    "Internal InnerObjectFormatsParsedJSON error.  Bad JSON.");
 
  170            bool const noObj = !parsed.
object.has_value();
 
  171            if (noObj == test.expectFail)
 
  177                std::string errStr(
"Unexpected STParsedJSON result on:\n");
 
 
 
Unserialize a JSON document into a Value.
 
bool parse(std::string const &document, Value &root)
Read a Value from a JSON document.
 
void pass()
Record a successful test condition.
 
void fail(String const &reason, char const *file, int line)
Record a failure.
 
Holds the serialized result of parsing an input JSON object.
 
std::optional< STObject > object
The STObject if the parse was successful.
 
A transaction testing environment.
 
bool contains_error(Json::Value const &json)
Returns true if the json contains an rpc error specification.
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.