xrpld
Loading...
Searching...
No Matches
xrpl::STParsedJSONObject Class Reference

Holds the serialized result of parsing an input JSON object. More...

#include <STParsedJSON.h>

Collaboration diagram for xrpl::STParsedJSONObject:

Public Member Functions

 STParsedJSONObject (std::string const &name, json::Value const &json)
 Parses and creates an STParsedJSON object.
 STParsedJSONObject ()=delete
 STParsedJSONObject (STParsedJSONObject const &)=delete
STParsedJSONObjectoperator= (STParsedJSONObject const &)=delete
 ~STParsedJSONObject ()=default

Public Attributes

std::optional< STObjectobject
 The STObject if the parse was successful.
json::Value error
 On failure, an appropriate set of error values.

Detailed Description

Holds the serialized result of parsing an input JSON object.

This does validation and checking on the provided JSON.

Definition at line 19 of file STParsedJSON.h.

Constructor & Destructor Documentation

◆ STParsedJSONObject() [1/3]

xrpl::STParsedJSONObject::STParsedJSONObject ( std::string const & name,
json::Value const & json )

Parses and creates an STParsedJSON object.

The result of the parsing is stored in object and error. Exceptions: Does not throw.

Parameters
nameThe name of the JSON field, used in diagnostics.
jsonThe JSON-RPC to parse.

Definition at line 1189 of file STParsedJSON.cpp.

◆ STParsedJSONObject() [2/3]

xrpl::STParsedJSONObject::STParsedJSONObject ( )
delete

◆ STParsedJSONObject() [3/3]

xrpl::STParsedJSONObject::STParsedJSONObject ( STParsedJSONObject const & )
delete

◆ ~STParsedJSONObject()

xrpl::STParsedJSONObject::~STParsedJSONObject ( )
default

Member Function Documentation

◆ operator=()

STParsedJSONObject & xrpl::STParsedJSONObject::operator= ( STParsedJSONObject const & )
delete

Member Data Documentation

◆ object

std::optional<STObject> xrpl::STParsedJSONObject::object

The STObject if the parse was successful.

Definition at line 38 of file STParsedJSON.h.

◆ error

json::Value xrpl::STParsedJSONObject::error

On failure, an appropriate set of error values.

Definition at line 41 of file STParsedJSON.h.