A meta-processor that specifies a list of specs to run against the object at the given index in the array.
More...
#include <MetaProcessors.hpp>
|
| ValidateArrayAt (std::size_t idx, std::initializer_list< FieldSpec > specs) |
| Constructs a processor that validates the specified element of a JSON array.
|
|
MaybeError | verify (boost::json::value &value, std::string_view key) const |
| Verify that the JSON array element at given index is valid according the stored specs.
|
|
A meta-processor that specifies a list of specs to run against the object at the given index in the array.
◆ ValidateArrayAt()
rpc::meta::ValidateArrayAt::ValidateArrayAt |
( |
std::size_t | idx, |
|
|
std::initializer_list< FieldSpec > | specs ) |
|
inline |
Constructs a processor that validates the specified element of a JSON array.
- Parameters
-
idx | The index inside the array to validate |
specs | The specifications to validate against |
◆ verify()
MaybeError rpc::meta::ValidateArrayAt::verify |
( |
boost::json::value & | value, |
|
|
std::string_view | key ) const |
|
nodiscard |
Verify that the JSON array element at given index is valid according the stored specs.
- Parameters
-
value | The JSON value representing the outer object |
key | The key used to retrieve the array from the outer object |
- Returns
- Possibly an error
The documentation for this class was generated from the following files:
- /__w/clio/clio/src/rpc/common/MetaProcessors.hpp
- /__w/clio/clio/src/rpc/common/MetaProcessors.cpp