Show / Hide Table of Contents

Class JsonSerializer

Default implementation of the IJsonSerializer interface. Inherit or nest and instance of this class and override its methods to allow inspection of payload.

Inheritance
System.Object
JsonSerializer
Implements
IJsonSerializer
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Klarna.Rest.Core.Serialization
Assembly: Klarna.Rest.Core.dll
Syntax
public class JsonSerializer : IJsonSerializer

Fields

| Improve this Doc View Source

SerializerSettings

Default json serialization settings for the Klarna API

Declaration
protected JsonSerializerSettings SerializerSettings
Field Value
Type Description
Newtonsoft.Json.JsonSerializerSettings

Methods

| Improve this Doc View Source

Deserialize<T>(String)

Should deserialize the json data to object of type T.

Declaration
public T Deserialize<T>(string json)
Parameters
Type Name Description
System.String json

JSON data to deserialize

Returns
Type Description
T
Type Parameters
Name Description
T

Object Type to deserialize into

| Improve this Doc View Source

Serialize(Object)

Should serialize the input object to json data

Declaration
public string Serialize(object item)
Parameters
Type Name Description
System.Object item

The object to serialize

Returns
Type Description
System.String

Implements

IJsonSerializer
  • Improve this Doc
  • View Source
Back to top Copyright (c) 2005-2019 Klarna Bank AB (publ). All rights reserved.