• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Dapplo.HttpExtensions
    • AuthorizationExtensions
    • HttpBehaviour
    • HttpBehaviourExtensions
    • HttpClientExtensions
    • HttpContentExtensions
    • HttpExtensionsGlobals
    • HttpRequestMessageConfiguration
    • HttpRequestMessageExtensions
    • HttpResponse
    • HttpResponse<TResponse, TErrorResponse>
    • HttpResponse<TResponse>
    • HttpResponseMessageExtensions
    • HttpResponseWithError<TErrorResponse>
    • IChangeableHttpBehaviour
    • IHttpBehaviour
    • IHttpContentConverter
    • IHttpRequestConfiguration
    • IHttpSettings
    • IJsonSerializer
    • MiscExtensions
    • UriActionExtensions
    • UriModifyExtensions
    • UriParseExtensions
  • Dapplo.HttpExtensions.ContentConverter
    • ByteArrayHttpContentConverter
    • DefaultJsonHttpContentConverter
    • DefaultJsonHttpContentConverterConfiguration
    • FormUriEncodedContentConverter
    • StreamHttpContentConverter
    • StringConfiguration
    • StringHttpContentConverter
    • SyndicationFeedHttpContentConverter
    • XDocumentHttpContentConverter
  • Dapplo.HttpExtensions.Extensions
    • EnumExtensions
    • HttpBehaviourExtensions
    • StringExtensions
    • TypeExtensions
  • Dapplo.HttpExtensions.Factory
    • HttpClientFactory
    • HttpContentFactory
    • HttpMessageHandlerFactory
    • HttpRequestMessageFactory
    • WebProxyFactory
  • Dapplo.HttpExtensions.JsonNet
    • JsonNetJsonSerializer
    • ReadOnlyConsideringContractResolver
  • Dapplo.HttpExtensions.JsonSimple
    • DataContractJsonSerializerStrategy
    • DefaultJsonHttpContentConverter
    • IJsonSerializerStrategy
    • JsonExtensionDataAttribute
    • PocoJsonSerializerStrategy
    • SimpleJson
    • SimpleJsonSerializer
  • Dapplo.HttpExtensions.Listener
    • HttpListenerContextExtensions
    • ListenerPortExtensions
    • UriHttpListenerExtensions
  • Dapplo.HttpExtensions.OAuth
    • AuthorizeModes
    • BaseOAuthSettings
    • GrantTypes
    • ICodeReceiverSettings
    • IOAuth1Token
    • IOAuth2Token
    • IOAuthCodeReceiver
    • OAuth1HttpBehaviour
    • OAuth1HttpBehaviourFactory
    • OAuth1HttpMessageHandler
    • OAuth1Parameters
    • OAuth1RequestConfiguration
    • OAuth1Settings
    • OAuth1SignatureTransports
    • OAuth1SignatureTypes
    • OAuth1Token
    • OAuth2HttpBehaviourFactory
    • OAuth2HttpMessageHandler
    • OAuth2Settings
    • OAuth2TokenResponse
    • OAuthExtensions
  • Dapplo.HttpExtensions.OAuth.CodeReceivers
    • EmbeddedBrowserCodeReceiver
  • Dapplo.HttpExtensions.OAuth.Desktop
    • OAuthLoginForm
  • Dapplo.HttpExtensions.Support
    • HttpPartAttribute
    • HttpParts
    • HttpRequestAttribute
    • HttpResponseAttribute
    • HttpSettings
    • MediaTypes
    • ProgressStream
    • ProgressStreamReport
  • Dapplo.HttpExtensions.SystemTextJson
    • SystemTextJsonSerializer
  • Dapplo.HttpExtensions.WinForms.ContentConverter
    • BitmapConfiguration
    • BitmapHttpContentConverter
  • Dapplo.HttpExtensions.Wpf.ContentConverter
    • BitmapSourceConfiguration
    • BitmapSourceHttpContentConverter

Class SimpleJsonSerializer

This defines the default way how Json is de-/serialized.

Inheritance
System.Object
SimpleJsonSerializer
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: Dapplo.HttpExtensions.JsonSimple
Assembly: Dapplo.HttpExtensions.JsonSimple.dll
Syntax
public class SimpleJsonSerializer : IJsonSerializer

Methods

| Improve this Doc View Source

CanDeserializeFrom(Type)

Test if the specified type can be deserialized

Declaration
public bool CanDeserializeFrom(Type targetType)
Parameters
Type Name Description
System.Type targetType

Type to check

Returns
Type Description
System.Boolean

bool

| Improve this Doc View Source

CanSerializeTo(Type)

Test if the specified type can be serialized to JSON

Declaration
public bool CanSerializeTo(Type sourceType)
Parameters
Type Name Description
System.Type sourceType

Type to check

Returns
Type Description
System.Boolean

bool

| Improve this Doc View Source

Deserialize(Type, String)

Declaration
public object Deserialize(Type targetType, string jsonString)
Parameters
Type Name Description
System.Type targetType

Type to deserialize from a json string

System.String jsonString

json

Returns
Type Description
System.Object

Deserialized json as targetType

| Improve this Doc View Source

RegisterGlobally(Boolean)

Register this IJsonSerializer globally

Declaration
public static void RegisterGlobally(bool force = true)
Parameters
Type Name Description
System.Boolean force

bool to specify if this also needs to be set when another serializer is already specified

| Improve this Doc View Source

Serialize<TContent>(TContent)

Declaration
public string Serialize<TContent>(TContent jsonObject)
Parameters
Type Name Description
TContent jsonObject

The actual object

Returns
Type Description
System.String

string with json

Type Parameters
Name Description
TContent

Type to serialize to json string

Implements

IJsonSerializer
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © Dapplo