Skip to content

CJSON_AS4CPP incompatable with original cJSON #1829

Open
@scottpakula

Description

@scottpakula

I had recently upgraded from aws-sdk-cpp 1.9.96 to 1.9.160, and in this update, the cJSON.h has been customized to redefine many functions to use the CJSON_AS4CPP convention.

The previous implementation looks like this:
https://github.com/aws/aws-sdk-cpp/blob/b7ad1b3e405ec730f1247f049bd700e7a3666622/aws-cpp-sdk-core/include/aws/core/external/cjson/cJSON.h

The current implementation looks like this:
https://github.com/aws/aws-sdk-cpp/blob/main/aws-cpp-sdk-core/include/aws/core/external/cjson/cJSON.h

For projects that are using cJSON.h as well as linking aws-sdk-cpp, this is a breaking change as the structure of cJSON becomes redefined because the header guards used by the original library are different.

To reproduce this issue, simply use the original library within an application that is also using the aws-sdk-cpp.
https://github.com/DaveGamble/cJSON

To avoid this issue, it would be ideal if the typedef struct cJSON within the aws-cpp-sdk was renamed to something like cJSON_AS4CPP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CmakeCmake related submissionsbugThis issue is a bug.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions