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][doc] Use Text Blocks to improve JSON text #17521

Merged
merged 3 commits into from
Sep 14, 2022

Conversation

coderzc
Copy link
Member

@coderzc coderzc commented Sep 7, 2022

Motivation

The JSON text has a lot of escape characters, we can use Text Blocks to improve it.

Modifications

Use Text Blocks to improve JSON text

Need to update docs?

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

@github-actions github-actions bot added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label Sep 7, 2022
@momo-jun momo-jun requested a review from nodece September 8, 2022 07:21
@nodece
Copy link
Member

nodece commented Sep 8, 2022

Could you use " instead of '?

@coderzc
Copy link
Member Author

coderzc commented Sep 8, 2022

Could you use " instead of '?

OK.

@coderzc
Copy link
Member Author

coderzc commented Sep 9, 2022

@nodece PTAL

Copy link
Member

@nodece nodece left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@coderzc
Copy link
Member Author

coderzc commented Sep 9, 2022

/pulsarbot run-failure-checks

@github-actions github-actions bot added doc-not-needed Your PR changes do not impact docs and removed doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. labels Sep 9, 2022
@coderzc coderzc changed the title [improve] Use Text Blocks to improve JSON text [improve][doc] Use Text Blocks to improve JSON text Sep 9, 2022
@github-actions github-actions bot added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. and removed doc-not-needed Your PR changes do not impact docs labels Sep 9, 2022
@nodece
Copy link
Member

nodece commented Sep 9, 2022

Overall job is optional, so you don't need to rerun the failure job.

Copy link
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Glad to see we gradually use new features beyond JDK11.

Out of the topic, we may be careful about using some new features like var - they will cause significant style inconsistency.

@nodece
Copy link
Member

nodece commented Sep 9, 2022

This is a good start, but we may need to note that this change does not benefit the cherry-pick operations, the old version doesn't support this syntax.

@coderzc
Copy link
Member Author

coderzc commented Sep 10, 2022

@momo-jun PTAL

@tisonkun
Copy link
Member

@momo-jun PTAL

I just notice this is for example shown on the doc. It can be a concern that leading whitespace may cause margin error. But fortunately Java text block detect margin by the close """ and these changes should be fine. See also https://docs.oracle.com/en/java/javase/15/text-blocks/index.html.

@github-actions github-actions bot added doc-not-needed Your PR changes do not impact docs and removed doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. labels Sep 10, 2022
@momo-jun momo-jun added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. and removed doc-not-needed Your PR changes do not impact docs labels Sep 13, 2022
@github-actions github-actions bot added doc-not-needed Your PR changes do not impact docs and removed doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. labels Sep 13, 2022
@github-actions github-actions bot added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. and removed doc-not-needed Your PR changes do not impact docs labels Sep 13, 2022
@codelipenghui codelipenghui merged commit b03058c into apache:master Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Your PR contains doc changes, no matter whether the changes are in markdown or code files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants