Class SerializerOptions
Options for controlling JSON serialization behavior.
Assembly: MicroJson.dll
View Source
Declaration
public class SerializerOptions
Properties
OmitNulls
Gets or sets whether to omit properties with null values from the JSON output. Default is false.
View Source
Declaration
public bool OmitNulls { get; set; }
WriteIndented
Gets or sets whether to format the JSON output with indentation and line breaks. Default is false (compact output).
View Source
Declaration
public bool WriteIndented { get; set; }
IndentString
Gets or sets the string used for indentation when WriteIndented is true. Default is two spaces.
View Source
Declaration
public string IndentString { get; set; }
ConvertNamesToCamelCase
Gets or sets whether to convert property names to camelCase during serialization. Default is true.
View Source
Declaration
public bool ConvertNamesToCamelCase { get; set; }
DateTimeFormat
Gets or sets the format to use for DateTime values. Default is ISO8601.
View Source
Declaration
public MicroJson.DateTimeFormat DateTimeFormat { get; set; }
Default
Gets the default serializer options with standard settings.
View Source
Declaration
public static SerializerOptions Default { get; }