PowerJson
A serializer that directly writes out JSON from .
Writes the JSON array representation from an to the output .
The data to be serialized.
The output target.
The to control advanced JSON serialization.
Turns an collection into an .
Creates an instance from a given instance.
The type of the data.
The data to be read.
An instance.
Experimental Feature:
Converts instances into for .
References:
1) https://github.com/matthewschrager/Repository/blob/master/Repository.EntityFramework/EntityDataReader.cs;
2) http://www.codeproject.com/Articles/876276/Bulk-Insert-Into-SQL-From-Csharp
The data type in the data source.
Initializes a new instance of the class.
The collection to be exported.
Initializes a new instance of the class.
The collection.
if set to true, read-only values will be exported to the .
This exception will be thrown when is a scalar type.
Closes the reader.
Gets the depth of the reader (0 is always returned).
Gets the schema table.
The schema table containing the following columns for each member: ColumnName, ColumnOrdinal, DataType, DataTypeName, ColumnSize.
Gets a value indicating whether this instance is closed.
true if this instance is closed; otherwise, false.
Proceed to the next result.
Always returns false.
Reads an object in the collection.
True if there is an object being read, otherwise, false.
The instance is disposed.
Gets the records affected (always returns -1).
Dispose the internal collection enumerator.
Gets the field count.
Gets a boolean value at the specific index.
The index of the field.
The value.
Gets a byte value at the specific index.
The index of the field.
The value.
Gets the bytes at the specific index.
The index of the field.
The field offset.
The buffer.
The buffer offset.
The length to read.
The number of bytes copied into the buffer.
Gets a value at the specific index.
The index of the field.
The value.
Gets a array at the specific index.
The index of the field.
The field offset.
The buffer.
The buffer offset.
The length to read.
The number of bytes copied into the buffer.
This method is not implemented.
The index of the field.
Gets the name of the data type.
The index of the field.
Gets a value at the specific index.
The index of the field.
The value.
Gets a value at the specific index.
The index of the field.
The value.
Gets a value at the specific index.
The index of the field.
The value.
Gets the type of the field.
The index of the field.
The of the member at specific field index.
Gets a value at the specific index.
The index of the field.
The value.
Gets a value at the specific index.
The index of the field.
The value.
Gets a value at the specific index.
The index of the field.
The value.
Gets a value at the specific index.
The index of the field.
The value.
Gets a value at the specific index.
The index of the field.
The value.
Gets the name of the field.
The index of the field.
The member name at the specific index.
Gets the ordinal index of a member.
The name of the member.
The field index of the member.
Gets a value at the specific index.
The index of the field.
The value.
Gets the value at the specific index.
The index of the field.
The value.
Loads all values into the array.
The array which holds the field values.
The number of fields loaded into the array.
Determines whether the field at the specific index is .
The index of the field.
True if the value is
Gets the value of a member with the specified name.
The name of the field.
The value of the member with the specific name.
Gets the value of a member at the specified index.
The index of the field.
The value of a member at the specified index.
An which converts between and string.
An which converts between and string.
A to convert to JSON strings. Currently deserialization has not yet been implemented.
A converts boolean values to 1/0 or "1"/"0", rather than the default "true" and "false" values.
Creates an instance of .
Creates an instance of , specifying whether the boolean values should be serialized to textual "1"/"0" values.
When this value is true, the boolean values will be serialized to textual "1"/"0" values.
Gets whether the boolean values should be serialized to textual "1"/"0" values.
Controls the naming format of serialized enum values.
The serialized names will be the same as the field name.
All letters in the serialized names will be changed to lowercase.
The first letter of each serialized names will be changed to lowercase.
All letters in the serialized names will be changed to uppercase.
Enum fields will be serialized numerically.
Controls the letter case of serialized field names.
The letter case of the serialized field names will be the same as the field or member name.
All letters in the serialized field names will be changed to lowercase.
The first letter of each serialized field names will be changed to lowercase.
All letters in the serialized field names will be changed to uppercase.
Indicates the state of a setting.
Represents the normal behavior.
Represents a positive setting. Actions should be taken to the object.
Represents a negative setting. Actions may not be taken to the object.
Contains extra s to help serializing extra types. Those converters will not automatically get effective unless they are applied to corresponding types via the method or members via the method.
Gets an to convert instances.
Gets an to convert instances.
Gets an to convert instances to numeric 1 or 0 rather than the default "true", "false" values.
Gets an to convert instances to literal "1" or "0" rather than the default "true", "false" values.
Gets an to convert instances.
Gets an to convert instances.
Gets an to convert instances.
Gets an to serialize or instances. NOTICE: Deserialization is not supported at this moment.
Elements will be serialized as a dictionary which contains the following three items:
XML NodeSerialization Result
- Element nameA dictionary entry with a name as the element qualified name surrounded with < and > and the value is its namespace URL.
- AttributesA dictionary entry with a name as the attribute name prefixed with an "@" character, and the value of the attribute.
- NodesAn array contains the child nodes of the element. The array can contain the following node types and child elements.
- Text, CDATA, Entity referenceA text in the nodes array.
- Processing Instruction, XML declarationA dictionary containing one name-value pair in the nodes array.
- CommentA dictionary in the nodes array with a name "!" and a value as the content of the comment.
Converts the member value being serialized or deserialized.
During deserialization, the JSON string is parsed and converted to primitive data.
The data could be one of the following six types returned from the JSON Parser: , , , , and .
The method should be able to process the above six types, as well as the null value, and convert the value to match the type of the member being deserialized.
If the method returns a instead of null or the type of , the deserializer will firstly attempt to revert the primitive data to match that type, and then pass the reverted value to the method.
By this means, the implementation of method does not have to cope with primitive data types.
To implement the method, keep in mind that the in the instance will always be primitive data.
Returns the expected type from the primitive data in .
If the returned type is not null, the deserializer will attempt to convert the of to match the returned type.
The item to be deserialized.
The expected data type.
Converts the to a new value during serialization.
The value to be serialized.
The new value.
Converts the to a new value during deserialization. The new value can be changed to a different type than the original value.
This enables adapting various data types from deserialization.
The could be one of six primitive value types.
For further information, refer to .
The item to be deserialized.
The new deserialized value.
A helper converter which implements the to convert between two specific types.
The original type of the data being serialized.
The serialized type of the data.
For further details about implementation, please refer to .
Creates an instance of .
Returns the expected type for . The default implementation returns .
The item to be deserialized.
The type of .
Converts the original value before serialization. If the serialized value is not the type of , the original will be returned.
The item to be serialized.
The new value.
Reverts the serialized value to . If the serialized value is not the type of , nothing will be changed.
The item to be deserialized.
The new deserialized value.
Converts to type before serialization.
The value being serialized.
The converted value.
Reverts the serialized to the type.
The serialized value.
The reverted value which has the type.
Represents a JSON name-value pair.
Gets whether the property of this instance can be changed.
During serialization, the of the property can be changed, and this value is true. During deserialization or serializing an item of an instance, the can not be changed, and this value is false.
The name of the item. During serialization, this property can be changed to serialize the member to another name. If the item is the object initially passed to the method (or its overloads), this value will be an empty string.
This value is changed during deserialization or serializing an item of an instance.
Gets or sets the value of the item. The type and value of this property can be changed. The serializer and deserializer will take the changed value.
Creates an instance of .
The name of the item.
The value of the item.
Deserializes an object.
The data to be deserialized.
The reflection cache of the type.
The data container. If this value is not null, deserialized members will be written to it. If null, new object will be created.
The deserialized object.
Cannot determine type from .
An interface to intercept various aspects in JSON serialization and deserialization.
It is recommended to inherit from for easier implementation when possible.
This method is called before values are written out during serialization. If the method returns false, the object will not be serialized.
The object being serialized.
Whether the object should be serialized.
This method is called before the serialization is finished. Extra values can be returned and written to the serialized result.
The object being serialized.
Extra values to be serialized.
This method is called after the object has been fully serialized.
The object being serialized.
This method is called before serializing a field or a property. If the method returns false, the member will not be serialized.
The container object.
The item to be serialized.
Whether the member should be serialized.
This method is called between the object has been created and the values are filled during deserialization.
This method provides an opportunity to initialize an object before deserialization.
The object being deserialized.
This method is called after the object has been fully deserialized. Data validation could be done onto the serialized object.
The object created from deserialization.
This method is called before deserializing a field or a property. If the method returns false, the member will not be deserialized.
The container object.
The item to be deserialized.
Whether the member should be deserialized.
This is a default implementation of , which restricts the type of the object being serialized or deserialized.
The default implementation does nothing and returns true for all OnSerializing or OnDeserializing methods.
The type of the object being serialized or deserialized.
This method is called before values are written out during serialization. If the method returns false, the object will not be serialized.
The object being serialized.
Whether the object should be serialized.
This method is called before the serialization is finished. Extra values can be returned and written to the serialized result.
The object being serialized.
Extra values to be serialized.
This method is called after the object has been fully serialized.
The object being serialized.
This method is called between the object has been created and the values are filled during deserialization.
This method provides an opportunity to initialize an object before deserialization.
The object being deserialized.
This method is called after the object has been fully deserialized. Data validation could be done onto the serialized object.
The object created from deserialization.
This method is called before serializing a field or a property. If the method returns false, the member will not be serialized.
The container object.
The item being serialized.
Whether the member should be serialized.
This method is called before deserializing a field or a property. If the method returns false, the member will not be deserialized.
The container object.
The item to be deserialized.
Whether the member should be deserialized.
An exception thrown during serialization or deserialization.
Initializes a new instance of the class.
Initializes a new instance of the class.
The message that describes the error.
Initializes a new instance of the class.
The message.
The inner exception.
Initializes a new instance of the class.
The that holds the serialized object data about the exception being thrown.
The that contains contextual information about the source or destination.
An exception thrown when parser encounters malformed JSON string.
Gets the index where parse error occurs.
Gets the context text around the error position.
Gets the reason which raises the exception.
The operation center of JSON serialization and deserialization.
Gets the default serialization manager for controlling the serializer.
Creates a formatted JSON string (beautified) from an object.
The object to be serialized.
Creates a JSON representation for an object with the default settings.
The object to be serialized.
Creates a JSON representation for an object with serialization manager override.
The object to be serialized.
The to control advanced JSON serialization.
The serialized JSON string.
Writes the JSON representation for an object to the output target.
The object to be serialized.
The output target.
The to control advanced JSON serialization.
Parses a JSON string and generate a or instance.
The object to be parsed.
The parsed object.
Creates a typed generic object from the JSON with the default settings in .
The type of the expected object after deserialization.
The JSON string to be deserialized.
The deserialized object of type .
Create a typed generic object from the JSON with serialization manager override on this call.
The type of the expected object after deserialization.
The JSON string to be deserialized.
The to control advanced JSON deserialization.
The deserialized object of type .
Creates an object from the JSON with the default settings.
The JSON string to be deserialized.
The serialized object.
Creates an object from the JSON with override on this call.
The JSON string to be deserialized.
The to control advanced JSON deserialization.
The deserialized object.
Creates an object from the JSON with override on this call.
The JSON string to be deserialized.
The type of the expected object after deserialization.
The to control advanced JSON deserialization.
The deserialized object.
Creates an object of type from the JSON with the default settings.
The JSON string to be deserialized.
The type of the expected object after deserialization.
The deserialized object of type .
Fills with the JSON representation with the default settings.
The object to contain the result of the deserialization.
The JSON representation string to be deserialized.
The object containing deserialized properties and fields from the JSON string.
Deep-copies an object i.e. clones to a new object.
The object to be deep copied.
The copy of .
Deep-copies an object i.e. clones to a new object.
The type of the object to be copied.
The object to be deep copied.
The copy of .
Deep-copies an object i.e. clones to a new object.
The type of the object to be copied.
The object to be deep copied.
The to control advanced JSON deserialization.
The copy of .
Creates a human readable string from the JSON.
The JSON string to be beautified.
A pretty-printed JSON string.
Create a human readable string from the JSON.
The JSON string to be beautified.
Indicates whether \uXXXX encoded Unicode notations should be converted into actual Unicode characters.
A pretty-printed JSON string.
Creates a minified string from the JSON.
The JSON string to be minified.
A minified JSON string.
This class encodes and decodes JSON strings.
Spec. details, see http://www.json.org/
This class serves as a lightweight text appender based on an internal .
Creates a wrapper delegate for the given method.
The delegate should have a similar signature as the , except that an argument in inserted before the method arguments.
A delegate definition. The first argument of the delegate will be used to invoke the method.
The method to be converted to the delegate.
The wrapper delegate to invoke the method.
(typeof(List).GetMethod("Add"));]]>
Finds a public instance method with the same name as and having arguments match the in the given .
The type which contains the method.
The method to match.
The types of method arguments. Null value in the array means the corresponding argument can be any type.
The method matches the name and argument types.
Whether the type is an abstract type, an interface, or object type.
Contains information about a member, used in reflection phase before serialization.
The name of the field or property.
The type of the member.
True if the member is a property, false for a field.
Indicates whether the member is read-only. Read-only properties or initialized-only fields returns true.
Indicates whether the member is static.
Indicates whether the member is publicly visible.
Caches reflection information for a member
The general implementation of , which takes custom attributes such as , , etc. into consideration.
Gets a value indicating whether XML serialization attributes should be used to control serialized field names. (default: false)
Ignore attributes to check for (default : XmlIgnoreAttribute).
Creates an instance of . For backward compatibility, is added into .
Creates an instance of and sets whether option is turned on. For backward compatibility, is added into .
Controls whether and other serialization attributes should be supported to control serialized field names.
This method is called to determine whether the values of the given type should be serialized as its numeric form rather than literal form. The override can be set via the .
An value type.
If the type should be serialized numerically, returns true, otherwise, false.
Gets the overridden name for an enum value. The overridden name can be set via the . If null or empty string is returned, the original name of the enum value is used.
The enum value member.
The name of the enum value.
Gets the type alias which can be used to determine derived types for abstract types, interface types or the type during deserialization.
The type to be serialized.
The alias denotes the type.
Gets whether the type is always deserializable. The value can be set via .
The type to be deserialized.
Whether the type can be deserialized even if it is a non-public type.
Returns the for given type. If no interceptor, null should be returned. The interceptor can be set via .
The type to be checked.
The interceptor.
This method is called to get the for the type. If no converter, null should be returned. The converter can be set via .
The type to be checked for .
The interceptor.
Gets the name of the collection container for customized types which implement and have extra members to be serialized.
The which implements and contains extra members to be serialized.
The name of the collection container. If null is returned, no container will be created.
By default, the serializer serializes types which implement interface as JSON arrays.
Members of the type will be ignored. And so to the types which implements .
To serialize those members, return a non-empty name and the members will be serialized into a field named returned by this method.
Returns whether the specific member is serializable. This value can be set via and .
If true is returned, the member will always get serialized.
If false is returned, the member will be excluded from serialization.
If null is returned, the serialization of the member will be determined by the settings in .
The member to be serialized.
Reflection information for the member.
True is returned if the member is serializable, otherwise, false.
Gets whether a field or a property is deserializable. If false is returned, the member will be excluded from deserialization. By default, writable fields or properties are deserializable. The value can be set via .
The member to be serialized.
Reflection information for the member.
True is returned if the member is serializable, otherwise, false.
This method returns possible names for corresponding types of a field or a property. This enables polymorphic serialization and deserialization for abstract classes, interfaces, or object types, with predetermined concrete types. If polymorphic serialization is not used, null or an empty could be returned. The names can be set via .
The of the field or property.
The dictionary contains types and their corresponding names.
The type does not derive from the member type.
This method returns a series of values that will not be serialized for a field or a property. When the value of the member matches those values, it will not be serialized. If all values can be serialized, null should be returned. The value can be set via .
The of the field or property.
The values which are not serialized for .
This method returns the to convert values for a field or a property during serialization and deserialization. If no converter is used, null can be returned. The converter can be set via .
The of the field or property.
The converter.
This method returns an instance to convert item values for a field or a property which is of type during serialization and deserialization. If no converter is used, null can be returned. The converter can be set via .
The of the field or property.
The converter.
This is an empty implementation of doing nothing but serving as a template class for method-overriding.
This method is called to determine whether the values of the given type should be serialized as its numeric form rather than literal form.
An value type.
If the type should be serialized numerically, returns true, otherwise, false.
This method is called to override the serialized name of an enum value. If null or empty string is returned, the original name of the enum value is used.
The enum value member.
The name of the enum value.
Gets the type alias which can be used to determine derived types for abstract types, interface types or the type during deserialization.
The type to be serialized.
The alias denotes the type.
This method is called before the constructor of a type is built for deserialization to detect whether the type is deserializable.
When this method returns true, the type can be deserialized regardless it is a non-public type.
Public types are always deserializable and not affected by the value returned from this method.
If the type contains generic parameters (for generic types) or an element type (for array types), the parameters and element types will be checked first.
The type to be deserialized.
Whether the type can be deserialized even if it is a non-public type.
This method is called to get the for the type. If no interceptor, null should be returned.
The type to be checked.
The interceptor.
This method is called to get the for the type. If no converter, null should be returned.
The type to be checked for .
The interceptor.
Gets the name of the collection container for customized types which implement and have extra members to be serialized.
The which implements and contains extra members to be serialized.
The name of the collection container. If null is returned, no container will be created.
By default, the serializer serializes types which implement interface as JSON arrays.
Members of the type will be ignored. And so to the types which implements .
To serialize those members, return a non-empty name and the members will be serialized into a field named returned by this method.
This method is called to determine whether a field or a property is serializable.
If false is returned, the member will be excluded from serialization.
If true is returned, the member will always get serialized.
If null is returned, the serialization of the member will be determined by the settings in .
The member to be serialized.
Reflection information for the member.
False is returned if the member is private, otherwise, null is returned.
This method is called to determine whether a field or a property is deserializable. If false is returned, the member will be excluded from deserialization. By default, writable fields or properties are deserializable.
The member to be serialized.
Reflection information for the member.
True is returned if the member is public, otherwise, false.
This method returns possible names for corresponding types of a field or a property. This enables polymorphic serialization and deserialization for abstract, interface, or object types, with predetermined concrete types. If polymorphic serialization is not used, null or an empty could be returned.
The of the field or property.
The dictionary contains types and their corresponding names.
This method returns a series of values that will not be serialized for a field or a property. When the value of the member matches those values, it will not be serialized. If all values can be serialized, null should be returned.
The of the field or property.
The values which are not serialized for .
This method returns the to convert values for a field or a property during serialization and deserialization. If no converter is used, null can be returned.
The of the field or property.
The converter.
This method returns an instance to convert item values for a field or a property which is of type during serialization and deserialization. If no converter is used, null can be returned.
The of the field or property.
The converter.
The controller interface to control type reflections for serialization and deserialization.
The interface works in the reflection phase. Its methods are executed typically once and the result will be cached. Consequently, changes occur after the reflection phase will not take effect.
It is recommended to inherit from or .
This method is called to determine how to format values of the given type.
An value type.
The format of the enum value.
This method is called to override the serialized name of an enum value. If null or empty string is returned, the original name of the enum value is used.
The enum value member.
The name of the enum value.
Gets the type alias which can be used to determine derived types for abstract types, interface types or the type during deserialization.
The type to be serialized.
The alias denotes the type.
This method is called before the constructor of a type is built for deserialization to detect whether the type is deserializable.
When this method returns true, the type can be deserialized regardless it is a non-public type.
Public types are always deserializable and not affected by the value returned from this method.
If the type contains type parameters (for generic types) or an element type (for array types), the parameters and element types will be checked first.
The type to be deserialized.
Whether the type can be deserialized even if it is a non-public type.
This method is called to get the for the type. If no interceptor, null should be returned.
The type to be checked for .
The interceptor.
This method is called to get the for the type. If no converter, null should be returned.
The type to be checked for .
The interceptor.
Gets the name of the collection container for customized types which implement and have extra members to be serialized.
The which implements and contains extra members to be serialized.
The name of the collection container. If null is returned, no container will be created.
By default, the serializer serializes types which implement interface as JSON arrays.
Members of those types will be ignored. And so to the types which implements .
To serialize those members, return a non-empty name for those types and the members will be serialized into a field with the returned name.
This method is called to determine whether a field or a property is serializable.
If false is returned, the member will be excluded from serialization.
If true is returned, the member will always get serialized.
If null is returned, the serialization of the member will be determined by the settings in .
The member to be serialized.
Reflection information for the member.
True is returned if the member is serializable, otherwise, false.
This method is called to determine whether a field or a property is deserializable. If false is returned, the member will be excluded from deserialization. By default, writable fields or properties are deserializable.
The member to be serialized.
Reflection information for the member.
True is returned if the member is serializable, otherwise, false.
Returns possible names for corresponding types of a field or a property.
This enables polymorphic serialization and deserialization for abstract, interface, or object types, with predetermined concrete types. If polymorphic serialization is not used, null or an empty dictionary could be returned.
The of the field or property.
The dictionary contains types and their corresponding names.
This method returns a series of values that will not be serialized for a field or a property. When the value of the member matches those values, it will not be serialized. If all values can be serialized, null should be returned.
The of the field or property.
The values which are not serialized for .
This method returns an instance to convert values for a field or a property during serialization and deserialization. If no converter is used, null can be returned.
The of the field or property.
The converter.
This method returns an instance to convert item values for a field or a property which is of type during serialization and deserialization. If no converter is used, null can be returned.
The of the field or property.
The converter.
Contains the names for a serialized member.
Gets the default name for the serialized member.
Initializes a new instance of the class.
A thread-safe .
The type of the dictionary key.
The type of the dictionary value.
Initializes a new instance of the class that is empty, has the specified initial capacity, and uses the default equality comparer for the key type.
Initializes a new instance of the class that is empty, has the default initial capacity, and uses the default equality comparer for the key type.
Clears all items.
Gets the value associated with the specified key.
The key of the value to get.
When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the parameter. This parameter is passed uninitialized.
Returns true if the dictionary contains an element with the specified key; otherwise, false.
Gets the number of key/value pairs contained in the dictionary.
Gets or sets the value associated with the specified key.
The key of the value to get or set.
The value associated with the specified key. If the specified key is not found, a get operation throws a , and a set operation creates a new element with the specified key.
Adds the specified key and value to the dictionary.
The key of the element to add.
The value of the element to add. The value can be null for reference types.
Removes specific key from the dictionary.
The key of the element to remove.
Indicates whether non-public classes, structs, fields or properties could be serialized and deserialized.
Indicates whether a field or property should be included in serialization.
To control whether a field or property should be deserialized, use the .
Gets whether the annotated field or property should be included in serialization disregarding whether it is read-only or not. The default value is true.
Indicates a member should be included in serialization.
Indicates whether a member should be included in serialization.
Indicates whether a member should be included in serialization.
Indicates the name and data type of a field or property.
The same field or property with multiple can have various names mapped to various types.
Gets the name of the serialized field or property.
The case of the serialized name defined in this attribute will not be changed by setting in .
Gets the type of the field or property.
Specifies the name of the serialized field or property.
The name of the serialized field or property.
Specifies the name of the serialized field or property which has a associated type.
The name of the serialized field or property.
The name is only used when the value is of this data type.
Indicates the name of the serialized data type, which will be used during polymorphic deserialization for instances of abstract types, interface types or the type.
Gets the name of the serialized class.
The case of the serialized name defined in this attribute will not be changed by setting in .
Specifies the name of the serialized type.
The name of the serialized type.
Specifies a value of the annotated member which is hidden from being serialized.
Gets the non-serialized value.
Specifies a value of the annotated member which is hidden from being serialized.
The non-serialized value.
Indicates the value format of the annotated enum type.
Specifies the format of an enum type.
The format of the serialized enum type.
Gets the format of the annotated enum type.
Controls the serialized name of an Enum value.
Gets the literal name of the Enum value.
Specifies the serialized name of the annotated Enum value.
Controls the object being serialized or deserialized.
The type of interceptor. The instance of the type should implement .
During serialization and deserialization, an instance of will be created to process values of the object being serialized or deserialized.
Marks a class or a struct to be processed by an .
The type of
The exception will be thrown if the type does not implements .
Controls data conversion in serialization and deserialization.
This attribute can be applied to types or type members.
If it is applied to types, the converter will be used in all instances of the type, each property or field that has that data type will use the converter prior to serialization or deserialization.
If both the type member and the type has applied this attribute, the attribute on the type member will have a higher precedence.
The type of converter to convert string to object. The type should implement .
During serialization and deserialization, an instance of will be used to convert values between their original type and target type.
Marks the value of a field or a property to be converted by an .
The type of the .
Exception can be thrown if the type does not implements .
Controls data conversion of items in serialization and deserialization.
The type of converter to convert string to object. The type should implement .
During serialization and deserialization, an instance of will be used to convert values between their original type and target type.
Marks the item value of a field or a property to be converted by an .
The type of the .
Exception can be thrown if the type does not implements .
Denotes a type which implements should be serialized with its members and items being placed to a field named by this attribute.
Gets the name of the container.
Initializes a new instance of the class.
The name of the container.
An overridden copy of .
Creates an instance of the type by calling its parameterless constructor.
The created instance.
The type has no constructor, or constructor is not publicly visible, or the constructor takes any argument.
A class controls special serialization for specified types and members.
This class can be used to control serialization and deserialization for specified types and members.
The overriding methods, such as , , etc., must be called before serialization or deserialization. Otherwise, inconsistent serialization results may occur between types.
Returns the currently used by the .
Uses the optimized fast Dataset Schema format (default = True)
Uses the fast GUID format (default = false)
Serializes null values to the output (default = True)
Serializes static fields or properties into the output (default = false).
Serializes arrays, collections, lists or dictionaries with no element (default = true).
If the collection is the root object, it is not affected by this setting. Byte arrays are not affected by this setting either.
Use the UTC date format (default = false)
Shows the read-only properties of types in the output (default = False). has higher precedence than this setting.
Shows the read-only fields of types in the output (default = False). has higher precedence than this setting.
Anonymous types have read only properties
Enables JSON extensions $type, $i (default = True).
This setting must be set to true if circular reference detection is required.
Use escaped Unicode i.e. \uXXXX format for non ASCII characters (default = false)
Outputs string key dictionaries as "k"/"v" format (default = False)
Outputs Enum values instead of names (default = False).
If you have parametric and no default constructor for you classes (default = False)
IMPORTANT NOTE : If True then all initial values within the class will be ignored and will be not set.
In this case, you can use to assign an to initialize the object.
Serializes DateTime milliseconds i.e. yyyy-MM-dd HH:mm:ss.nnn (default = false)
Maximum depth for circular references in inline mode (default = 20)
Inlines circular or already seen objects instead of replacement with $i (default = False)
Controls the case of serialized field names.
Gets the singleton instance.
Creates a new instance of .
The will be initialized to a new instance of .
Creates a new instance of with a specific .
The controller to control object reflections before serialization.
Clears all cached override information.
Loads the serialization information into the overrides dictionary and return the information.
The which holds the serialization information.
The newly loaded .
Overrides reflection result with for the type. If the type is already overridden, either automatically or manually, the will merged into the existing reflected info.
The type to be overridden.
The override info of the type.
Overrides reflection result with for the type.
The type to be overridden.
The override info of the type.
If this value is true, the reflection engine will reflect the type again and apply the , otherwise, is merged into the existing reflection cache.
Overrides reflection result with for the specific type and optionally purge existing overrides.
The type to be overridden.
The override info of the type.
If this value is true, the reflection engine will reflect the type again and apply the , otherwise, is merged into the existing reflection cache.
At this moment, the override only affects the registered type.
If a class has its subclasses, the override will not be applied to its subclasses.
The parameter or is null.
No member is found for a in .
Assigns an to process a specific type.
This is a simplified version of method replacing the of a type.
The type to be processed by the interceptor.
The interceptor to intercept the serialization and deserialization.
If the type has already gotten an , the new will replace it. If the new interceptor is null, existing interceptor will be removed from the type.
Assigns an alias for a specific type.
This is a simplified version of method replacing the of a type.
The alias for the type.
If the type has already gotten an alias, the new alias will replace it. If the new alias is null, existing alias will be removed.
Assigns an to process a specific type.
This is a simplified version of method replacing the of a type.
The type to be processed by the interceptor.
The converter to convert instances of type before the serialization and deserialization.
If the type has already gotten an , the new will replace it.
If the new converter is null, existing converter will be removed from the type.
Assigns the serialized name of a field or property.
This is a simplified version of method replacing the serialized name of a member.
The type containing the member.
The name of the field or property.
The serialized name of the member.
If is null or , the field or property name will be used.
Assigns the serialized name of a field or property.
This is a simplified version of method replacing the serialized name of a member.
The type containing the member.
The name of the field or property.
The serialized name of the member.
If is null or , the field or property name will be used.
Assigns an to convert the value of the specific member.
This is a simplified version of method replacing the of a member.
The type containing the member.
The member to be assigned.
The converter to process the member value.
If the member has already gotten an , the new will replace it.
If the new converter is null, existing converter will be removed from the type.
No field or property matches in .
Assigns new name mapping for an Enum type .
The type of the Enum.
The value mapper for the enum type .
The key of the dictionary is the original name of the enum value to be overridden, the value is the new serialized name to be specified to the value.
is not an Enum type.
Assigns new name mapping for an Enum type .
The type of the Enum.
The Enum value mapper.
The key of the dictionary is the original name of the enum value to be overridden, the value is the new serialized name to be specified to the value.
is not an Enum type.
Contains reflection overriding information, used in type reflection phase before serialization or deserialization.
Specifies the alias to identify the type.
Specifies whether the type is deserializable disregarding its visibility.
Gets or sets the for the overridden type.
Gets or sets the for the overridden type.
Gets or sets the name of the container for the overridden type which implements or .
Gets the override information for members.
Initializes a new instance of the class.
Initializes a new instance of the class.
The alias for the type.
Contains reflection override settings for a member.
Gets the name of the overridden member.
Gets or sets the serialized name for the member.
Gets the polymorphic serialization for the member.
The item key is the type and the item value is the serialized name corresponding to the type.
The type should derive from the type of the member.
Gets or sets whether the member is always serialized (true), never serialized (false) or compliant to the existing behavior (null).
Gets or sets whether the member can be deserialized (true), never deserialized (false) or compliant to the existing behavior (null).
Gets the values of the member that should not be serialized.
Gets or sets the for the member.
If the member has a converter before the override, and the value of this converter is null, existing converter will be removed after the override.
Gets or sets the for the item of an member.
If the member has an item converter before the override, and the value of this converter is null, existing converter will be removed after the override.
Creates an instance of .
The name of the member.
is null or an empty string.
Creates an instance of , setting the property.
The name of the member.
Whether the member should be serialized.
Creates an instance of , setting the property and property.
The name of the member.
How the member is serialized.
Whether the member should be deserialized.
Creates an instance of , setting the property.
The name of the member.
The converter.
Creates an instance of , setting the property.
The name of the member.
The serialized name of the member.