Search Results for

    Show / Hide Table of Contents

    Class DefaultMarshaller

    IMarshaller implementation based on Json.NET.

    Inheritance
    object
    DefaultMarshaller
    Implements
    IMarshaller
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Ingenico.Connect.Sdk.DefaultImpl
    Assembly: connect-sdk-dotnet.dll
    Syntax
    public sealed class DefaultMarshaller : IMarshaller

    Properties

    Instance

    Declaration
    public static DefaultMarshaller Instance { get; }
    Property Value
    Type Description
    DefaultMarshaller

    Methods

    Marshal(object)

    Marshal a request object to a JSON string.

    Declaration
    public string Marshal(object requestObject)
    Parameters
    Type Name Description
    object requestObject

    The request object.

    Returns
    Type Description
    string

    Unmarshal<T>(Stream)

    Unmarshal JSON from a stream to a response object.

    Declaration
    public T Unmarshal<T>(Stream responseJson)
    Parameters
    Type Name Description
    Stream responseJson

    The stream containing a valid JSON string.

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    The response type.

    Exceptions
    Type Condition
    MarshallerSyntaxException

    if the JSON is not a valid representation for an object of the given type

    Unmarshal<T>(string)

    Unmarshal a JSON string to a response object.

    Declaration
    public T Unmarshal<T>(string responseJson)
    Parameters
    Type Name Description
    string responseJson

    The JSON that will be parsed.

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    The response type.

    Exceptions
    Type Condition
    MarshallerSyntaxException

    if the JSON is not a valid representation for an object of the given type

    Implements

    IMarshaller
    In This Article
    Back to top Copyright (c) 2016 Global Collect Services B.V.