Files
rippled/include/xrpl/protocol/STParsedJSON.h
Bart 1d42c4f6de refactor: Remove unnecessary copyright notices already covered by LICENSE.md (#5929)
Per XLS-0095, we are taking steps to rename ripple(d) to xrpl(d).

This change specifically removes all copyright notices referencing Ripple, XRPLF, and certain affiliated contributors upon mutual agreement, so the notice in the LICENSE.md file applies throughout. Copyright notices referencing external contributions remain as-is. Duplicate verbiage is also removed.
2025-11-04 08:33:42 +00:00

41 lines
1.1 KiB
C++

#ifndef XRPL_PROTOCOL_STPARSEDJSON_H_INCLUDED
#define XRPL_PROTOCOL_STPARSEDJSON_H_INCLUDED
#include <xrpl/protocol/STArray.h>
#include <optional>
namespace ripple {
/** Holds the serialized result of parsing an input JSON object.
This does validation and checking on the provided JSON.
*/
class STParsedJSONObject
{
public:
/** Parses and creates an STParsedJSON object.
The result of the parsing is stored in object and error.
Exceptions:
Does not throw.
@param name The name of the JSON field, used in diagnostics.
@param json The JSON-RPC to parse.
*/
STParsedJSONObject(std::string const& name, Json::Value const& json);
STParsedJSONObject() = delete;
STParsedJSONObject(STParsedJSONObject const&) = delete;
STParsedJSONObject&
operator=(STParsedJSONObject const&) = delete;
~STParsedJSONObject() = default;
/** The STObject if the parse was successful. */
std::optional<STObject> object;
/** On failure, an appropriate set of error values. */
Json::Value error;
};
} // namespace ripple
#endif