Skip to content

[Bug] http connector in common protocol has a json deserialization error #5233

@liuforgit

Description

@liuforgit

Search before asking

  • I had searched in the issues and found no similar issues.

Environment

Linux

EventMesh version

master

What happened

when use http connector in common protocol,data type is json,there is a json deserialization error.

JsonUtils.parseObject(jsonString, String.class)` attempts to deserialize a JSON object into a String type

  • An exception is thrown at the bottom layer of Jackson due to type mismatch

How to reproduce

enable http connector,using postman ,data like {"name":"Andy"}

Debug logs

org.apache.eventmesh.common.exception.JsonException: deserialize json string to object error
    at org.apache.eventmesh.common.utils.JsonUtils.parseObject(JsonUtils.java:124)
    at org.apache.eventmesh.connector.http.source.protocol.impl.CommonProtocol.lambda$setHandler$0(CommonProtocol.java:80)

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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