Show / Hide Table of Contents

Class JsonObjectSerializer

JSON-сериализатор объектов.

Inheritance
System.Object
JsonObjectSerializer
Namespace:InfinniPlatform.Serialization
Assembly:InfinniPlatform.Core.dll
Syntax
public class JsonObjectSerializer : object, IJsonObjectSerializer, IObjectSerializer

Constructors

| Improve this Doc View Source

JsonObjectSerializer(Boolean, Encoding, IEnumerable<IKnownTypesSource>, IEnumerable<IMemberValueConverter>, IEnumerable<ISerializerErrorHandler>)

Declaration
public JsonObjectSerializer(bool withFormatting = false, Encoding encoding = null, IEnumerable<IKnownTypesSource> knownTypes = null, IEnumerable<IMemberValueConverter> valueConverters = null, IEnumerable<ISerializerErrorHandler> errorHandlers = null)
Parameters
Type Name Description
System.Boolean withFormatting
Encoding encoding
IEnumerable<IKnownTypesSource> knownTypes
IEnumerable<IMemberValueConverter> valueConverters
IEnumerable<ISerializerErrorHandler> errorHandlers

Fields

| Improve this Doc View Source

Default

Экземпляр с настройками по умолчанию.

Declaration
public static readonly JsonObjectSerializer Default
Field Value
Type Description
JsonObjectSerializer
| Improve this Doc View Source

DefaultEncoding

Кодировка по умолчанию.

Declaration
public static readonly Encoding DefaultEncoding
Field Value
Type Description
Encoding
| Improve this Doc View Source

Formatted

Экземпляр с настройками форматирования.

Declaration
public static readonly JsonObjectSerializer Formatted
Field Value
Type Description
JsonObjectSerializer

Properties

| Improve this Doc View Source

Encoding

Кодировка символов.

Declaration
public Encoding Encoding { get; }
Property Value
Type Description
Encoding

Methods

| Improve this Doc View Source

ConvertFromDynamic(Object, Type)

Преобразовать динамический объект в строготипизированный.

Declaration
public object ConvertFromDynamic(object value, Type type)
Parameters
Type Name Description
System.Object value
Type type
Returns
Type Description
System.Object
| Improve this Doc View Source

ConvertToDynamic(Object)

Преобразовать строготипизированный объект в динамический.

Declaration
public object ConvertToDynamic(object value)
Parameters
Type Name Description
System.Object value
Returns
Type Description
System.Object
| Improve this Doc View Source

ConvertToString(Object)

Преобразовать объект в строку.

Declaration
public string ConvertToString(object value)
Parameters
Type Name Description
System.Object value
Returns
Type Description
System.String
| Improve this Doc View Source

Deserialize(Stream)

Десериализовать объект.

Declaration
public object Deserialize(Stream data)
Parameters
Type Name Description
Stream data

Поток для чтения сериализованного представление объекта.

Returns
Type Description
System.Object

Объект.

| Improve this Doc View Source

Deserialize(Stream, Type)

Десериализовать объект.

Declaration
public object Deserialize(Stream data, Type type)
Parameters
Type Name Description
Stream data

Поток для чтения сериализованного представление объекта.

Type type

Тип объекта.

Returns
Type Description
System.Object

Объект.

| Improve this Doc View Source

Deserialize(Byte[])

Десериализовать объект.

Declaration
public object Deserialize(byte[] data)
Parameters
Type Name Description
System.Byte[] data

Сериализованное представление объекта.

Returns
Type Description
System.Object

Объект.

| Improve this Doc View Source

Deserialize(Byte[], Type)

Десериализовать объект.

Declaration
public object Deserialize(byte[] data, Type type)
Parameters
Type Name Description
System.Byte[] data

Сериализованное представление объекта.

Type type

Тип объекта.

Returns
Type Description
System.Object

Объект.

| Improve this Doc View Source

Deserialize(String)

Десериализовать объект.

Declaration
public object Deserialize(string data)
Parameters
Type Name Description
System.String data

Сериализованное представление объекта.

Returns
Type Description
System.Object

Объект.

| Improve this Doc View Source

Deserialize(String, Type)

Десериализовать объект.

Declaration
public object Deserialize(string data, Type type)
Parameters
Type Name Description
System.String data

Поток для чтения сериализованного представление объекта.

Type type

Тип объекта.

Returns
Type Description
System.Object

Объект.

| Improve this Doc View Source

Serialize(Stream, Object)

Сериализовать объект.

Declaration
public void Serialize(Stream data, object value)
Parameters
Type Name Description
Stream data

Поток для записи сериализованного представление объекта.

System.Object value

Объект.

| Improve this Doc View Source

Serialize(Object)

Сериализовать объект.

Declaration
public byte[] Serialize(object value)
Parameters
Type Name Description
System.Object value

Объект.

Returns
Type Description
System.Byte[]

Сериализованное представление объекта.

Extension Methods

DynamicCollectionExtensions.GetItem(Object, Int32)
DynamicCollectionExtensions.SetItem(Object, Int32, Object)
DynamicCollectionExtensions.AddItem(Object, Object)
DynamicCollectionExtensions.InsertItem(Object, Int32, Object)
DynamicCollectionExtensions.RemoveItem(Object, Object)
DynamicCollectionExtensions.RemoveItemAt(Object, Int32)
DynamicCollectionExtensions.MoveItem(Object, Object, Int32)
DynamicObjectExtensions.TryGetPropertyValue(Object, String)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TryGetPropertyValueByPath(Object, String)
DynamicObjectExtensions.TrySetPropertyValueByPath(Object, String, Object)
ReflectionExtensions.IsInstanceOfType(Object, Type)
ReflectionExtensions.GetMemberValue(Object, String)
ReflectionExtensions.SetMemberValue(Object, String, Object)
ReflectionExtensions.InvokeMember(Object, String, Object[], out Object, Type[])
ReflectionExtensions.GetFieldValue(Object, FieldInfo)
ReflectionExtensions.SetFieldValue(Object, FieldInfo, Object)
ReflectionExtensions.GetPropertyValue(Object, PropertyInfo)
ReflectionExtensions.SetPropertyValue(Object, PropertyInfo, Object)
ReflectionExtensions.GetMethodDelegate(Object, MethodInfo)
ReflectionExtensions.GetEventDelegate(Object, EventInfo)
ReflectionExtensions.SetEventDelegate(Object, EventInfo, Object)
CommonExtensions.ExecuteSilent<T>(T, Action<T>)
  • Improve this Doc
  • View Source
Back to top © Copyright Infinnity Solutions Ltd, 2010–2017.