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

Try to parse json string into a block object

json- json string for a block
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

Try to transform block to json string

block- block to be serialized
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: