TEC
A lightweight C++ library enabling safe, efficient execution in multithreaded and concurrent systems.
Loading...
Searching...
No Matches
tec::JsonSerializable Struct Referenceabstract

Base interface for objects that support JSON serialization. More...

#include <tec_serialize.hpp>

Public Member Functions

virtual std::string to_json () const =0
 Convert this object to a JSON string representation.
 

Detailed Description

Base interface for objects that support JSON serialization.

This is a pure abstract interface. Derived classes must implement all pure virtual methods to be instantiable.

Member Function Documentation

◆ to_json()

virtual std::string tec::JsonSerializable::to_json ( ) const
pure virtual

Convert this object to a JSON string representation.

The returned string should be valid JSON. It is typically used for debugging, logging, or saving configuration/state in text form.

Returns
A std::string containing the JSON representation of the object.

The documentation for this struct was generated from the following file: