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

Use raw string literals #354

Merged
merged 1 commit into from
Mar 10, 2023
Merged

Use raw string literals #354

merged 1 commit into from
Mar 10, 2023

Conversation

sungam3r
Copy link
Contributor

@sungam3r sungam3r commented Mar 10, 2023

In general for better readability.

@SimonCropp SimonCropp merged commit 0a29ea3 into serilog:dev Mar 10, 2023
@0xced
Copy link
Member

0xced commented Mar 10, 2023

Should we add a global.json file to ensure that the .NET 7 SDK is used? It is required for raw string literals which are a C# 11 feature.

@SimonCropp
Copy link
Contributor

@0xced good idea #355

@sungam3r sungam3r deleted the raw branch March 11, 2023 05:58
0xced added a commit to 0xced/serilog-settings-configuration that referenced this pull request Mar 16, 2023
So that we can get rid of the `ToValidJson` extension method.

Now that raw string literals have been introduced (in serilog#354) having valid _readable_ JSON in strings for tests becomes easy. There is no need to escape quotes anymore with either `\"` or `""`.

This will also make it easier for newcomers to understand the tests at first glance. I had my WTF moment when I first saw JSON with single quotes. 🤔
@nblumhardt nblumhardt mentioned this pull request May 10, 2023
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

Successfully merging this pull request may close these issues.

3 participants