• 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 SystemTextJsonSerializer

Made to have Dapplo.HttpExtension use System.Text.Json

Inheritance
System.Object
SystemTextJsonSerializer
Implements
IJsonSerializer
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Dapplo.HttpExtensions.SystemTextJson
Assembly: Dapplo.HttpExtensions.SystemTextJson.dll
Syntax
public class SystemTextJsonSerializer : IJsonSerializer

Properties

| Improve this Doc View Source

Options

The JsonSerializerOptions used in the JsonSerializer

Declaration
public JsonSerializerOptions Options { get; set; }
Property Value
Type Description
System.Text.Json.JsonSerializerOptions

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)

Deserialize the specified json string into the target type

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

Type

System.String jsonString

string

Returns
Type Description
System.Object

object

| Improve this Doc View Source

RegisterGlobally(Boolean)

Register this IJsonSerializer

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<T>(T)

Serialize the passed object into a json string

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

object of type T

Returns
Type Description
System.String

string

Type Parameters
Name Description
T

type for the object to serialize

Implements

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