Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serializedRequest by ObjectMapper #124

Open
littlelouishu opened this issue Feb 1, 2023 · 0 comments
Open

serializedRequest by ObjectMapper #124

littlelouishu opened this issue Feb 1, 2023 · 0 comments

Comments

@littlelouishu
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant