hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
shared_model::proto::ProtoBlockJsonConverter Class Reference

#include "proto_block_json_converter.hpp"

Inheritance diagram for shared_model::proto::ProtoBlockJsonConverter:
Inheritance graph
Collaboration diagram for shared_model::proto::ProtoBlockJsonConverter:
Collaboration graph

Public Member Functions

iroha::expected::Result< interface::types::JsonType, std::string > serialize (const interface::Block &block) const noexceptoverride
 
iroha::expected::Result< std::unique_ptr< interface::Block >, std::string > deserialize (const interface::types::JsonType &json) const noexceptoverride
 
- Public Member Functions inherited from shared_model::interface::BlockJsonConverter
 ~BlockJsonConverter () override=default
 
- Public Member Functions inherited from shared_model::interface::BlockJsonSerializer
virtual ~BlockJsonSerializer ()=default
 
- Public Member Functions inherited from shared_model::interface::BlockJsonDeserializer
virtual ~BlockJsonDeserializer ()=default
 

Member Function Documentation

iroha::expected::Result< std::unique_ptr< interface::Block >, std::string > ProtoBlockJsonConverter::deserialize ( const interface::types::JsonType json) const
overridevirtualnoexcept

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

Implements shared_model::interface::BlockJsonDeserializer.

iroha::expected::Result< interface::types::JsonType, std::string > ProtoBlockJsonConverter::serialize ( const interface::Block block) const
overridevirtualnoexcept

Try to transform block to json string

Parameters
block- block to be serialized
Returns
json string or an error

Implements shared_model::interface::BlockJsonSerializer.

Here is the caller graph for this function:


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