Skip to content

JsonProcessor.h is not self-contained (missing includes / forward declarations) #223

@bobsira

Description

@bobsira

Problem

\JsonProcessor.h\ relies on the precompiled header (\pch.h) to provide
lohmann::json, \AttributesMap, \LoggerSettings, \LogSource, and several STL types. Any translation unit that includes it without the PCH will fail to compile.

This makes the header fragile and increases coupling.

Expected behavior

\JsonProcessor.h\ should compile standalone. Include the minimal required headers (or add forward declarations where possible) so that it is self-contained.

Types currently missing from the header:

Symbol Source
\
lohmann::json\ <nlohmann/json.hpp>\ or forward-declare \
lohmann::json\
\AttributesMap\ \Utility.h\
\LoggerSettings\ \Parser/LoggerSettings.h\
\LogSource\ \Parser/LoggerSettings.h\
\std::shared_ptr\ <memory>\
\std::vector\ <vector>\ (already included)
\std::string\ <string>\ (already included)

Context

Raised during Copilot code review on PR #222.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions