hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
shared_model::interface::BlockJsonDeserializer Class Referenceabstract

#include "block_json_deserializer.hpp"

Inheritance diagram for shared_model::interface::BlockJsonDeserializer:
Inheritance graph
Collaboration diagram for shared_model::interface::BlockJsonDeserializer:
Collaboration graph

Public Member Functions

virtual iroha::expected::Result< std::unique_ptr< Block >, std::stringdeserialize (const types::JsonType &json) const noexcept=0
 
virtual ~BlockJsonDeserializer ()=default
 

Detailed Description

BlockJsonDeserializer is an interface which allows transforming json string to block objects.

Constructor & Destructor Documentation

virtual shared_model::interface::BlockJsonDeserializer::~BlockJsonDeserializer ( )
virtualdefault

Member Function Documentation

virtual iroha::expected::Result<std::unique_ptr<Block>, std::string> shared_model::interface::BlockJsonDeserializer::deserialize ( const types::JsonType json) const
pure virtualnoexcept

Try to parse json string into a block object

Parameters
json- json string for a block
Returns
pointer to a block if json was valid or an error

Implemented in shared_model::proto::ProtoBlockJsonConverter.


The documentation for this class was generated from the following file: