Show / Hide Table of Contents

Interface ISerializer

Serialization interface that supports serialize and deserialize methods.

Namespace: Google.Apis
Assembly: Google.Apis.Core.dll
Syntax
public interface ISerializer

Properties

Format

Gets the application format this serializer supports (e.g. "json", "xml", etc.).

Declaration
string Format { get; }
Property Value
Type Description
System.String

Methods

Deserialize(String, Type)

Deserializes the string into an object.

Declaration
object Deserialize(string input, Type type)
Parameters
Type Name Description
System.String input
System.Type type
Returns
Type Description
System.Object

Deserialize<T>(Stream)

Deserializes the stream into an object.

Declaration
T Deserialize<T>(Stream input)
Parameters
Type Name Description
System.IO.Stream input
Returns
Type Description
T
Type Parameters
Name Description
T

Deserialize<T>(String)

Deserializes the string into an object.

Declaration
T Deserialize<T>(string input)
Parameters
Type Name Description
System.String input
Returns
Type Description
T
Type Parameters
Name Description
T

Serialize(Object)

Serializes the specified object into a string.

Declaration
string Serialize(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.String

Serialize(Object, Stream)

Serializes the specified object into a Stream.

Declaration
void Serialize(object obj, Stream target)
Parameters
Type Name Description
System.Object obj
System.IO.Stream target

Extension Methods

Utilities.ThrowIfNull<T>(T, String)
In This Article
Back to top