Class SerializerOptions
A very simple, light-weight JSON library written by Mario to teach Geo how things are done
This is an useful helper for small tasks but it doesn't represent a full-featured serializer such as the beloved Json.NET.
Inherited Members
Namespace: Swan.Formatters
Syntax
public class SerializerOptions
Constructors
SerializerOptions(Boolean, String, String[], String[], Boolean, Nullable<IReadOnlyCollection<WeakReference>>, JsonSerializerCase)
Initializes a new instance of the SerializerOptions class.
Declaration
public SerializerOptions(bool format, string typeSpecifier, string[] includeProperties, string[] excludeProperties = null, bool includeNonPublic = true, IReadOnlyCollection<WeakReference>? parentReferences = default(IReadOnlyCollection<WeakReference>? ), JsonSerializerCase jsonSerializerCase = JsonSerializerCase.None)
Parameters
Type | Name | Description |
---|---|---|
Boolean | format | if set to |
String | typeSpecifier | The type specifier. |
String[] | includeProperties | The include properties. |
String[] | excludeProperties | The exclude properties. |
Boolean | includeNonPublic | if set to |
Nullable<IReadOnlyCollection<WeakReference>> | parentReferences | The parent references. |
JsonSerializerCase | jsonSerializerCase | The json serializer case. |
Properties
ExcludeProperties
Gets or sets the exclude properties.
Declaration
public string[] ExcludeProperties { get; set; }
Property Value
Type | Description |
---|---|
String[] | The exclude properties. |
Format
Gets a value indicating whether this SerializerOptions is format.
Declaration
public bool Format { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
IncludeNonPublic
Gets a value indicating whether [include non public].
Declaration
public bool IncludeNonPublic { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
JsonSerializerCase
Gets the json serializer case.
Declaration
public JsonSerializerCase JsonSerializerCase { get; }
Property Value
Type | Description |
---|---|
JsonSerializerCase | The json serializer case. |
TypeSpecifier
Gets the type specifier.
Declaration
public string TypeSpecifier { get; }
Property Value
Type | Description |
---|---|
String | The type specifier. |