Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b0e8003
Add IndentText json option
manandre Nov 25, 2023
d283b53
Add IndentText for json source generator
manandre Nov 25, 2023
eb0d433
Add tests
manandre Nov 25, 2023
6ea532e
IndentText must be non-nullable
manandre Nov 26, 2023
c8995a1
Improve performance
manandre Nov 26, 2023
3f82e03
Add extra tests
manandre Nov 26, 2023
c88aaf3
Cleanup
manandre Nov 27, 2023
86c4de5
Apply suggestions from code review
manandre Nov 28, 2023
976651f
Fixes following code review
manandre Nov 28, 2023
71e77db
Fixes following code review #2
manandre Dec 1, 2023
7c44dda
Add tests for invalid characters
manandre Dec 1, 2023
e42ea75
Handle RawIndent length
manandre Dec 1, 2023
face6cc
Move all to RawIndentation
manandre Dec 1, 2023
29118b4
Update documentation
manandre Dec 1, 2023
6f6eca7
Additional fixes from code review
manandre Dec 4, 2023
037f2fa
Move to the new API
manandre Dec 15, 2023
7c76a35
Extra fixes and enhancements
manandre Dec 15, 2023
cbd6dba
Fixes from code review
manandre Dec 24, 2023
37a305a
Avoid introducing extra fields in JsonWriterOptions
manandre Dec 24, 2023
5b11220
Fix OOM error
manandre Dec 24, 2023
ed7e1b2
Use bitwise logic for IndentedOrNotSkipValidation
manandre Dec 26, 2023
01fc002
Cache indentation options in Utf8JsonWriter
manandre Dec 26, 2023
f00943e
Add missing test around indentation options
manandre Dec 26, 2023
5dc575b
New fixes from code review
manandre Dec 28, 2023
d5e8835
Update src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf…
eiriktsarpalis Dec 29, 2023
2bfbf0c
Add test to check default values of the JsonWriterOptions properties
manandre Dec 29, 2023
00617c2
Fix comment
manandre Jan 2, 2024
4964a53
Merge branch 'main' into json-indent-text
manandre Jan 6, 2024
c14eaf7
Merge branch 'main' into json-indent-text
eiriktsarpalis Jan 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Eirik Tsarpalis <[email protected]>
  • Loading branch information
manandre and eiriktsarpalis authored Nov 28, 2023
commit 86c4de54a4ff3c9041c3a90f4176bcd3be6fd4a5
1 change: 1 addition & 0 deletions src/libraries/System.Text.Json/Common/JsonConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ internal static partial class JsonConstants
public const int StackallocByteThreshold = 256;
public const int StackallocCharThreshold = StackallocByteThreshold / 2;

// Two space characters is the default indentation.
public const string DefaultIndent = " ";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,7 @@ public bool WriteIndented
}

/// <summary>
/// Defines the text used as indent when <see cref="WriteIndented" /> is enabled
/// By default, the JSON is indented with 2 white spaces.
/// Defines the indentation string being used when <see cref="WriteIndented" /> is enabled. Defaults to two space characters.
/// </summary>
/// <exception cref="InvalidOperationException">
/// Thrown if this property is set after serialization or deserialization has occurred.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ public bool Indented
}

/// <summary>
/// Defines the text used as indent by the <see cref="Utf8JsonWriter"/> when <see cref="Indented"/> is enabled
/// By default, the JSON is written with 2 white spaces.
/// Defines the indentation string used by<see cref="Utf8JsonWriter"/> when <see cref="Indented"/> is enabled. Defaults to two space characters.
/// </summary>
public string IndentText
{
Expand Down