Class NewtonJsonMessageConverter
Inheritance
System.Object
NewtonJsonMessageConverter
Implements
IServiceNameAware
Assembly: Steeltoe.Messaging.MessagingBase.dll
Syntax
public class NewtonJsonMessageConverter : AbstractMessageConverter, ISmartMessageConverter, IMessageConverter
Constructors
|
Edit this page
View Source
NewtonJsonMessageConverter()
Declaration
public NewtonJsonMessageConverter()
|
Edit this page
View Source
NewtonJsonMessageConverter(MimeType[])
Declaration
public NewtonJsonMessageConverter(params MimeType[] supportedMimeTypes)
Parameters
Type |
Name |
Description |
MimeType[] |
supportedMimeTypes |
|
Fields
|
Edit this page
View Source
DEFAULT_SERVICE_NAME
Declaration
public const string DEFAULT_SERVICE_NAME = null
Field Value
Type |
Description |
System.String |
|
Properties
|
Edit this page
View Source
ServiceName
Declaration
public override string ServiceName { get; set; }
Property Value
Type |
Description |
System.String |
|
Overrides
|
Edit this page
View Source
Settings
Declaration
public JsonSerializerSettings Settings { get; }
Property Value
Type |
Description |
JsonSerializerSettings |
|
Methods
|
Edit this page
View Source
CanConvertFrom(IMessage, Type)
Declaration
public override bool CanConvertFrom(IMessage message, Type targetClass)
Parameters
Type |
Name |
Description |
IMessage |
message |
|
Type |
targetClass |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
|
Edit this page
View Source
Declaration
public override bool CanConvertTo(object payload, IMessageHeaders headers = null)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
|
Edit this page
View Source
ConvertFromInternal(IMessage, Type, Object)
Declaration
protected override object ConvertFromInternal(IMessage message, Type targetClass, object conversionHint)
Parameters
Type |
Name |
Description |
IMessage |
message |
|
Type |
targetClass |
|
System.Object |
conversionHint |
|
Returns
Type |
Description |
System.Object |
|
Overrides
|
Edit this page
View Source
Declaration
protected override object ConvertToInternal(object payload, IMessageHeaders headers, object conversionHint)
Parameters
Type |
Name |
Description |
System.Object |
payload |
|
IMessageHeaders |
headers |
|
System.Object |
conversionHint |
|
Returns
Type |
Description |
System.Object |
|
Overrides
|
Edit this page
View Source
GetIMessageGenericType(Type)
Declaration
protected static Type GetIMessageGenericType(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
|
Edit this page
View Source
GetJsonEncoding(MimeType)
Declaration
protected static Encoding GetJsonEncoding(MimeType contentType)
Parameters
Type |
Name |
Description |
MimeType |
contentType |
|
Returns
Type |
Description |
Encoding |
|
|
Edit this page
View Source
GetTargetType(Type, Object)
Declaration
protected static Type GetTargetType(Type targetClass, object conversionHint)
Parameters
Type |
Name |
Description |
Type |
targetClass |
|
System.Object |
conversionHint |
|
Returns
|
Edit this page
View Source
IsIMessageGenericType(Type)
Declaration
protected static bool IsIMessageGenericType(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
Type |
Description |
System.Boolean |
|
|
Edit this page
View Source
Supports(Type)
Declaration
protected override bool Supports(Type clazz)
Parameters
Type |
Name |
Description |
Type |
clazz |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
Implements
IServiceNameAware