Skip to main content

JsonTypeSerializer

Assembly: ServiceStack.Text.dll
View Source
Declaration
public struct JsonTypeSerializer : ITypeSerializer

Properties

ObjectDeserializer

View Source
Declaration
public ObjectDeserializerDelegate ObjectDeserializer { readonly get; set; }

IncludeNullValues

View Source
Declaration
public readonly bool IncludeNullValues { get; }

IncludeNullValuesInDictionaries

View Source
Declaration
public readonly bool IncludeNullValuesInDictionaries { get; }

TypeAttrInObject

View Source
Declaration
public readonly string TypeAttrInObject { get; }

Fields

Instance

View Source
Declaration
public static ITypeSerializer Instance

Methods

GetWriteFn<T>()

View Source
Declaration
public WriteObjectDelegate GetWriteFn<T>()
Returns

ServiceStack.Text.Common.WriteObjectDelegate

Type Parameters
  • T

GetWriteFn(Type)

View Source
Declaration
public WriteObjectDelegate GetWriteFn(Type type)
Returns

ServiceStack.Text.Common.WriteObjectDelegate

Parameters
TypeName
System.Typetype

GetTypeInfo(Type)

View Source
Declaration
public TypeInfo GetTypeInfo(Type type)
Returns

ServiceStack.Text.Json.TypeInfo

Parameters
TypeName
System.Typetype

WriteRawString(TextWriter, String)

Shortcut escape when we're sure value doesn't contain any escaped chars

View Source
Declaration
public void WriteRawString(TextWriter writer, string value)
Parameters
TypeName
System.IO.TextWriterwriter
System.Stringvalue

WritePropertyName(TextWriter, String)

View Source
Declaration
public void WritePropertyName(TextWriter writer, string value)
Parameters
TypeName
System.IO.TextWriterwriter
System.Stringvalue

WriteString(TextWriter, String)

View Source
Declaration
public void WriteString(TextWriter writer, string value)
Parameters
TypeName
System.IO.TextWriterwriter
System.Stringvalue

WriteBuiltIn(TextWriter, Object)

View Source
Declaration
public void WriteBuiltIn(TextWriter writer, object value)
Parameters
TypeName
System.IO.TextWriterwriter
System.Objectvalue

WriteObjectString(TextWriter, Object)

View Source
Declaration
public void WriteObjectString(TextWriter writer, object value)
Parameters
TypeName
System.IO.TextWriterwriter
System.Objectvalue

WriteFormattableObjectString(TextWriter, Object)

View Source
Declaration
public void WriteFormattableObjectString(TextWriter writer, object value)
Parameters
TypeName
System.IO.TextWriterwriter
System.Objectvalue

WriteException(TextWriter, Object)

View Source
Declaration
public void WriteException(TextWriter writer, object value)
Parameters
TypeName
System.IO.TextWriterwriter
System.Objectvalue

WriteDateTime(TextWriter, Object)

View Source
Declaration
public void WriteDateTime(TextWriter writer, object oDateTime)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectoDateTime

WriteNullableDateTime(TextWriter, Object)

View Source
Declaration
public void WriteNullableDateTime(TextWriter writer, object dateTime)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectdateTime

WriteDateTimeOffset(TextWriter, Object)

View Source
Declaration
public void WriteDateTimeOffset(TextWriter writer, object oDateTimeOffset)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectoDateTimeOffset

WriteNullableDateTimeOffset(TextWriter, Object)

View Source
Declaration
public void WriteNullableDateTimeOffset(TextWriter writer, object dateTimeOffset)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectdateTimeOffset

WriteTimeSpan(TextWriter, Object)

View Source
Declaration
public void WriteTimeSpan(TextWriter writer, object oTimeSpan)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectoTimeSpan

WriteNullableTimeSpan(TextWriter, Object)

View Source
Declaration
public void WriteNullableTimeSpan(TextWriter writer, object oTimeSpan)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectoTimeSpan

WriteGuid(TextWriter, Object)

View Source
Declaration
public void WriteGuid(TextWriter writer, object oValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectoValue

WriteNullableGuid(TextWriter, Object)

View Source
Declaration
public void WriteNullableGuid(TextWriter writer, object oValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectoValue

WriteBytes(TextWriter, Object)

View Source
Declaration
public void WriteBytes(TextWriter writer, object oByteValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectoByteValue

WriteChar(TextWriter, Object)

View Source
Declaration
public void WriteChar(TextWriter writer, object charValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectcharValue

WriteByte(TextWriter, Object)

View Source
Declaration
public void WriteByte(TextWriter writer, object byteValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectbyteValue

WriteSByte(TextWriter, Object)

View Source
Declaration
public void WriteSByte(TextWriter writer, object sbyteValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectsbyteValue

WriteInt16(TextWriter, Object)

View Source
Declaration
public void WriteInt16(TextWriter writer, object intValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectintValue

WriteUInt16(TextWriter, Object)

View Source
Declaration
public void WriteUInt16(TextWriter writer, object intValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectintValue

WriteInt32(TextWriter, Object)

View Source
Declaration
public void WriteInt32(TextWriter writer, object intValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectintValue

WriteUInt32(TextWriter, Object)

View Source
Declaration
public void WriteUInt32(TextWriter writer, object uintValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectuintValue

WriteInt64(TextWriter, Object)

View Source
Declaration
public void WriteInt64(TextWriter writer, object integerValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectintegerValue

WriteUInt64(TextWriter, Object)

View Source
Declaration
public void WriteUInt64(TextWriter writer, object ulongValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectulongValue

WriteBool(TextWriter, Object)

View Source
Declaration
public void WriteBool(TextWriter writer, object boolValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectboolValue

WriteFloat(TextWriter, Object)

View Source
Declaration
public void WriteFloat(TextWriter writer, object floatValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectfloatValue

WriteDouble(TextWriter, Object)

View Source
Declaration
public void WriteDouble(TextWriter writer, object doubleValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectdoubleValue

WriteDecimal(TextWriter, Object)

View Source
Declaration
public void WriteDecimal(TextWriter writer, object decimalValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectdecimalValue

WriteEnum(TextWriter, Object)

View Source
Declaration
public void WriteEnum(TextWriter writer, object enumValue)
Parameters
TypeName
System.IO.TextWriterwriter
System.ObjectenumValue

GetParseFn<T>()

View Source
Declaration
public ParseStringDelegate GetParseFn<T>()
Returns

ServiceStack.Text.Common.ParseStringDelegate

Type Parameters
  • T

GetParseStringSpanFn<T>()

View Source
Declaration
public ParseStringSpanDelegate GetParseStringSpanFn<T>()
Returns

ServiceStack.Text.Common.ParseStringSpanDelegate

Type Parameters
  • T

GetParseFn(Type)

View Source
Declaration
public ParseStringDelegate GetParseFn(Type type)
Returns

ServiceStack.Text.Common.ParseStringDelegate

Parameters
TypeName
System.Typetype

GetParseStringSpanFn(Type)

View Source
Declaration
public ParseStringSpanDelegate GetParseStringSpanFn(Type type)
Returns

ServiceStack.Text.Common.ParseStringSpanDelegate

Parameters
TypeName
System.Typetype

ParseRawString(String)

View Source
Declaration
public string ParseRawString(string value)
Returns

System.String

Parameters
TypeName
System.Stringvalue

ParseString(ReadOnlySpan<Char>)

View Source
Declaration
public string ParseString(ReadOnlySpan<char> value)
Returns

System.String

Parameters
TypeName
ReadOnlySpan<System.Char>value

ParseString(String)

View Source
Declaration
public string ParseString(string value)
Returns

System.String

Parameters
TypeName
System.Stringvalue

IsEmptyMap(ReadOnlySpan<Char>, Int32)

View Source
Declaration
public static bool IsEmptyMap(ReadOnlySpan<char> value, int i = 1)
Returns

System.Boolean

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Int32i

UnescapeString(String)

View Source
Declaration
public string UnescapeString(string value)
Returns

System.String

Parameters
TypeName
System.Stringvalue

UnescapeString(ReadOnlySpan<Char>)

View Source
Declaration
public ReadOnlySpan<char> UnescapeString(ReadOnlySpan<char> value)
Returns

ReadOnlySpan<System.Char>

Parameters
TypeName
ReadOnlySpan<System.Char>value

UnescapeStringAsObject(ReadOnlySpan<Char>)

View Source
Declaration
public object UnescapeStringAsObject(ReadOnlySpan<char> value)
Returns

System.Object

Parameters
TypeName
ReadOnlySpan<System.Char>value

UnescapeSafeString(String)

View Source
Declaration
public string UnescapeSafeString(string value)
Returns

System.String

Parameters
TypeName
System.Stringvalue

UnescapeSafeString(ReadOnlySpan<Char>)

View Source
Declaration
public ReadOnlySpan<char> UnescapeSafeString(ReadOnlySpan<char> value)
Returns

ReadOnlySpan<System.Char>

Parameters
TypeName
ReadOnlySpan<System.Char>value

UnescapeJsString(ReadOnlySpan<Char>, Char)

View Source
Declaration
public static ReadOnlySpan<char> UnescapeJsString(ReadOnlySpan<char> json, char quoteChar)
Returns

ReadOnlySpan<System.Char>

Parameters
TypeName
ReadOnlySpan<System.Char>json
System.CharquoteChar

UnescapeJsString(ReadOnlySpan<Char>, Char, Boolean, Int32)

View Source
Declaration
public static SpanIndex UnescapeJsString(ReadOnlySpan<char> json, char quoteChar, bool removeQuotes, int index)
Returns

ServiceStack.Text.Json.SpanIndex

Parameters
TypeName
ReadOnlySpan<System.Char>json
System.CharquoteChar
System.BooleanremoveQuotes
System.Int32index

Unescape(String)

View Source
Declaration
public static string Unescape(string input)
Returns

System.String

Parameters
TypeName
System.Stringinput

Unescape(String, Boolean)

View Source
Declaration
public static string Unescape(string input, bool removeQuotes)
Returns

System.String

Parameters
TypeName
System.Stringinput
System.BooleanremoveQuotes

Unescape(ReadOnlySpan<Char>)

View Source
Declaration
public static ReadOnlySpan<char> Unescape(ReadOnlySpan<char> input)
Returns

ReadOnlySpan<System.Char>

Parameters
TypeName
ReadOnlySpan<System.Char>input

Unescape(ReadOnlySpan<Char>, Boolean)

View Source
Declaration
public static ReadOnlySpan<char> Unescape(ReadOnlySpan<char> input, bool removeQuotes)
Returns

ReadOnlySpan<System.Char>

Parameters
TypeName
ReadOnlySpan<System.Char>input
System.BooleanremoveQuotes

Unescape(ReadOnlySpan<Char>, Boolean, Char)

View Source
Declaration
public static ReadOnlySpan<char> Unescape(ReadOnlySpan<char> input, bool removeQuotes, char quoteChar)
Returns

ReadOnlySpan<System.Char>

Parameters
TypeName
ReadOnlySpan<System.Char>input
System.BooleanremoveQuotes
System.CharquoteChar

ConvertFromUtf32(Int32)

Given a character as utf32, returns the equivalent string provided that the character is legal json.

View Source
Declaration
public static string ConvertFromUtf32(int utf32)
Returns

System.String

Parameters
TypeName
System.Int32utf32

EatTypeValue(String, ref Int32)

View Source
Declaration
public string EatTypeValue(string value, ref int i)
Returns

System.String

Parameters
TypeName
System.Stringvalue
System.Int32i

EatTypeValue(ReadOnlySpan<Char>, ref Int32)

View Source
Declaration
public ReadOnlySpan<char> EatTypeValue(ReadOnlySpan<char> value, ref int i)
Returns

ReadOnlySpan<System.Char>

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Int32i

EatMapStartChar(String, ref Int32)

View Source
Declaration
public bool EatMapStartChar(string value, ref int i)
Returns

System.Boolean

Parameters
TypeName
System.Stringvalue
System.Int32i

EatMapStartChar(ReadOnlySpan<Char>, ref Int32)

View Source
Declaration
public bool EatMapStartChar(ReadOnlySpan<char> value, ref int i)
Returns

System.Boolean

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Int32i

EatMapKey(String, ref Int32)

View Source
Declaration
public string EatMapKey(string value, ref int i)
Returns

System.String

Parameters
TypeName
System.Stringvalue
System.Int32i

EatMapKey(ReadOnlySpan<Char>, ref Int32)

View Source
Declaration
public ReadOnlySpan<char> EatMapKey(ReadOnlySpan<char> value, ref int i)
Returns

ReadOnlySpan<System.Char>

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Int32i

EatMapKeySeperator(String, ref Int32)

View Source
Declaration
public bool EatMapKeySeperator(string value, ref int i)
Returns

System.Boolean

Parameters
TypeName
System.Stringvalue
System.Int32i

EatMapKeySeperator(ReadOnlySpan<Char>, ref Int32)

View Source
Declaration
public bool EatMapKeySeperator(ReadOnlySpan<char> value, ref int i)
Returns

System.Boolean

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Int32i

EatItemSeperatorOrMapEndChar(String, ref Int32)

View Source
Declaration
public bool EatItemSeperatorOrMapEndChar(string value, ref int i)
Returns

System.Boolean

Parameters
TypeName
System.Stringvalue
System.Int32i

EatItemSeperatorOrMapEndChar(ReadOnlySpan<Char>, ref Int32)

View Source
Declaration
public bool EatItemSeperatorOrMapEndChar(ReadOnlySpan<char> value, ref int i)
Returns

System.Boolean

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Int32i

EatWhitespace(ReadOnlySpan<Char>, ref Int32)

View Source
Declaration
public void EatWhitespace(ReadOnlySpan<char> value, ref int i)
Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Int32i

EatWhitespace(String, ref Int32)

View Source
Declaration
public void EatWhitespace(string value, ref int i)
Parameters
TypeName
System.Stringvalue
System.Int32i

EatValue(String, ref Int32)

View Source
Declaration
public string EatValue(string value, ref int i)
Returns

System.String

Parameters
TypeName
System.Stringvalue
System.Int32i

EatValue(ReadOnlySpan<Char>, ref Int32)

View Source
Declaration
public ReadOnlySpan<char> EatValue(ReadOnlySpan<char> value, ref int i)
Returns

ReadOnlySpan<System.Char>

Parameters
TypeName
ReadOnlySpan<System.Char>value
System.Int32i

Implements