Common
A library of common classes.
JsonWriterSettings.cs
1using System.Text;
2
4{
8 public class JsonWriterSettings
9 {
13 public Encoding Encoding { get; set; } = Encoding.UTF8;
14
18 public bool Indent { get; set; }
19
23 public string IndentCharacters { get; set; } = string.Empty;
24
29 {
30 return new JsonWriterSettings
31 {
32 Indent = true,
33 IndentCharacters = " ",
34 };
35 }
36 }
37}
Contains settings for JSON writer formatting.
static JsonWriterSettings PrettyPrintSettings()
Returns new settings for pretty printing.
bool Indent
If true, indenting wil be applied.
string IndentCharacters
The characters used for indents.