Skip to content

Implement struct-based JSON serialization with visitor pattern #55

@mfaferek93

Description

@mfaferek93

Summary

Current JSON response building uses manual field-by-field assignment (data_result["status"] = "data"). This is error-prone and requires updates in multiple places when response structure changes.


Proposed solution

Define response structs (e.g., TopicSampleResponse) and implement template-based JSON conversion using visitor pattern. Libraries like nlohmann/json support to_json/from_json ADL customization points.


Additional context

Reference: data_access_manager.cpp - manual JSON construction in get_topic_sample_with_fallback()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions