Files
logos-cpp-sdk/cpp/implementations/plain/json_codec.h
T
Dario Lipicar 25c88f4d48 support non-local remote transports (#57)
* 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
2026-05-07 12:27:14 -03:00

23 lines
719 B
C++

#ifndef LOGOS_PLAIN_JSON_CODEC_H
#define LOGOS_PLAIN_JSON_CODEC_H
#include "wire_codec.h"
namespace logos::plain {
// JsonCodec — uses nlohmann::json::dump / parse for the payload bytes.
// Default codec for now; a future CborCodec will swap in by using
// json::to_cbor / from_cbor on the same message structs.
class JsonCodec : public IWireCodec {
public:
std::vector<uint8_t> encode(const AnyMessage&) override;
AnyMessage decode(MessageType tag,
const uint8_t* data,
std::size_t len) override;
std::string name() const override { return "json"; }
};
} // namespace logos::plain
#endif // LOGOS_PLAIN_JSON_CODEC_H