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

Improve resiliency to formatting JSON in server #48706

Merged

Conversation

pugnascotia
Copy link
Contributor

Backport of #48553. Make a number of changes so that JSON in the server
directory is more resilient to automatic formatting. This covers:

  • Reformatting multiline JSON to embed whitespace in the strings
  • Add helper method stripWhitespace(), to strip whitespace from a JSON
    document using XContent methods. This is sometimes necessary where
    a test is comparing some machine-generated JSON with an expected
    value.

Make a number of changes so that JSON in the server directory is more
resilient to automatic formatting. This covers:

   * Reformatting multiline JSON to embed whitespace in the strings
   * Add helper method `stripWhitespace()`, to strip whitespace from a JSON
     document using XContent methods. This is sometimes necessary where
     a test is comparing some machine-generated JSON with an expected
     value.
@pugnascotia pugnascotia added :Core/Infra/Core Core issues without another label backport v7.6.0 labels Oct 30, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Core)

@pugnascotia pugnascotia merged commit d96976e into elastic:7.x Oct 31, 2019
@pugnascotia pugnascotia deleted the formatting-fixes-server-json-7-x branch October 31, 2019 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Core/Infra/Core Core issues without another label v7.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants