userver: userver/ugrpc/proto_json.hpp File Reference
Loading...
Searching...
No Matches
proto_json.hpp File Reference

Detailed Description

Utilities for conversion Protobuf -> Json.

Definition in file proto_json.hpp.

Go to the source code of this file.

#include <google/protobuf/struct.pb.h>
#include <google/protobuf/util/json_util.h>
#include <userver/formats/json.hpp>
#include <userver/formats/json/serialize.hpp>

Namespaces

namespace  ugrpc
 Asynchronous gRPC driver.
 
namespace  formats
 Value formats representation, parsing and serialization.
 
namespace  formats::serialize
 Common serializers.
 
namespace  formats::parse
 Generic parsers and converters.
 

Functions

formats::json::Value ugrpc::MessageToJson (const google::protobuf::Message &message)
 Returns formats::json::Value representation of protobuf message.
 
std::string ugrpc::ToString (const google::protobuf::Message &message)
 Converts message to human readable string.
 
std::string ugrpc::ToJsonString (const google::protobuf::Message &message)
 Returns Json-string representation of protobuf message.
 
json::Value formats::serialize::Serialize (const google::protobuf::Message &message, To< json::Value >)
 
google::protobuf::Value formats::parse::Parse (const formats::json::Value &value, To< google::protobuf::Value >)