mirror of
https://github.com/logos-co/logos-cpp-sdk.git
synced 2026-08-31 17:51:07 +00:00
* support non-local remote transports * fix LogosResult * allow getting client over specific transport * fix ssl * investiage ssl error * pr comments * allow transport set configuration on any module * pr comments * add docs * pr comments * propagate only non-qt dependencies * restore ABI compatibility
23 lines
668 B
C++
23 lines
668 B
C++
#ifndef LOGOS_PLAIN_JSON_MAPPING_H
|
|
#define LOGOS_PLAIN_JSON_MAPPING_H
|
|
|
|
// Shared RpcValue ↔ nlohmann::json conversion used by both JsonCodec
|
|
// (dump / parse as text) and CborCodec (to_cbor / from_cbor as bytes).
|
|
// The JSON representation is the canonical in-memory form; codecs differ
|
|
// only in how they serialize that form to the wire.
|
|
|
|
#include "rpc_message.h"
|
|
#include "rpc_value.h"
|
|
#include "wire_codec.h"
|
|
|
|
#include <nlohmann/json.hpp>
|
|
|
|
namespace logos::plain {
|
|
|
|
nlohmann::json messageToJson(const AnyMessage& msg);
|
|
AnyMessage jsonToMessage(MessageType tag, const nlohmann::json& j);
|
|
|
|
} // namespace logos::plain
|
|
|
|
#endif // LOGOS_PLAIN_JSON_MAPPING_H
|