xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
protocol
STParsedJSON.h
1
#pragma once
2
3
#include <xrpl/json/json_value.h>
4
#include <xrpl/protocol/STObject.h>
5
6
#include <
cstddef
>
7
#include <
optional
>
8
#include <
string
>
9
10
namespace
xrpl
{
11
15
inline
constexpr
std::size_t
kMaxParsedJsonDepth
= 64;
16
21
inline
constexpr
std::size_t
kMaxParsedJsonArraySize
= 512;
22
27
class
STParsedJSONObject
28
{
29
public
:
39
STParsedJSONObject
(
std::string
const
& name,
json::Value
const
&
json
);
40
41
STParsedJSONObject
() =
delete
;
42
STParsedJSONObject
(
STParsedJSONObject
const
&) =
delete
;
43
STParsedJSONObject
&
44
operator=
(
STParsedJSONObject
const
&) =
delete
;
45
~STParsedJSONObject
() =
default
;
46
50
std::optional<STObject>
object
;
51
55
json::Value
error
;
56
};
57
58
}
// namespace xrpl
std::string
json::Value
Represents a JSON value.
Definition
json_value.h:117
xrpl::STParsedJSONObject::object
std::optional< STObject > object
The STObject if the parse was successful.
Definition
STParsedJSON.h:50
xrpl::STParsedJSONObject::error
json::Value error
On failure, an appropriate set of error values.
Definition
STParsedJSON.h:55
xrpl::STParsedJSONObject::STParsedJSONObject
STParsedJSONObject(std::string const &name, json::Value const &json)
Parses and creates an STParsedJSON object.
Definition
STParsedJSON.cpp:1202
xrpl::STParsedJSONObject::STParsedJSONObject
STParsedJSONObject(STParsedJSONObject const &)=delete
xrpl::STParsedJSONObject::STParsedJSONObject
STParsedJSONObject()=delete
xrpl::STParsedJSONObject::operator=
STParsedJSONObject & operator=(STParsedJSONObject const &)=delete
xrpl::STParsedJSONObject::~STParsedJSONObject
~STParsedJSONObject()=default
cstddef
json
JSON (JavaScript Object Notation).
Definition
json_errors.h:5
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::kMaxParsedJsonDepth
constexpr std::size_t kMaxParsedJsonDepth
Maximum JSON object nesting depth permitted during parsing.
Definition
STParsedJSON.h:15
xrpl::kMaxParsedJsonArraySize
constexpr std::size_t kMaxParsedJsonArraySize
Maximum number of elements permitted in any JSON array field during parsing.
Definition
STParsedJSON.h:21
optional
std::size_t
string
Generated by
1.17.0