Skip to content

serializedRequest by ObjectMapper #124

@littlelouishu

Description

@littlelouishu

WebClientGraphQLClient.class
@Suppress("BlockingMethodInNonBlockingContext") val serializedRequest = GraphQLClients.objectMapper.writeValueAsString( Request( query, variables, operationName ) )

I noticed some strange behavior I think in the the code above.

if the LF (\n) in json value, the result of serializedRequest is \n.
if the escaped LF (\n) in json value, the result of serializedRequest is \\n.

I expect result of serializedRequest is \n. (Since the server side can't parse the json which \n in it well, \n is OK.)
How can I do this? Can I customize the ObjectMapper above?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions