JsonTypeSerializer
Assembly: ServiceStack.Text.dll
Declaration
public struct JsonTypeSerializer : ITypeSerializer
Properties
ObjectDeserializer
Declaration
public ObjectDeserializerDelegate ObjectDeserializer { readonly get; set; }
IncludeNullValues
Declaration
public readonly bool IncludeNullValues { get; }
IncludeNullValuesInDictionaries
Declaration
public readonly bool IncludeNullValuesInDictionaries { get; }
TypeAttrInObject
Declaration
public readonly string TypeAttrInObject { get; }
Fields
Instance
Declaration
public static ITypeSerializer Instance
Methods
GetWriteFn<T>()
Declaration
public WriteObjectDelegate GetWriteFn<T>()
Returns
ServiceStack.Text.Common.WriteObjectDelegate
Type Parameters
GetWriteFn(Type)
Declaration
public WriteObjectDelegate GetWriteFn(Type type)
Returns
ServiceStack.Text.Common.WriteObjectDelegate
Parameters
GetTypeInfo(Type)
Declaration
public TypeInfo GetTypeInfo(Type type)
Returns
ServiceStack.Text.Json.TypeInfo
Parameters
WriteRawString(TextWriter, String)
Shortcut escape when we're sure value doesn't contain any escaped chars
Declaration
public void WriteRawString(TextWriter writer, string value)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.String | value |
WritePropertyName(TextWriter, String)
Declaration
public void WritePropertyName(TextWriter writer, string value)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.String | value |
WriteString(TextWriter, String)
Declaration
public void WriteString(TextWriter writer, string value)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.String | value |
WriteBuiltIn(TextWriter, Object)
Declaration
public void WriteBuiltIn(TextWriter writer, object value)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | value |
WriteObjectString(TextWriter, Object)
Declaration
public void WriteObjectString(TextWriter writer, object value)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | value |
WriteFormattableObjectString(TextWriter, Object)
Declaration
public void WriteFormattableObjectString(TextWriter writer, object value)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | value |
WriteException(TextWriter, Object)
Declaration
public void WriteException(TextWriter writer, object value)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | value |
WriteDateTime(TextWriter, Object)
Declaration
public void WriteDateTime(TextWriter writer, object oDateTime)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | oDateTime |
WriteNullableDateTime(TextWriter, Object)
Declaration
public void WriteNullableDateTime(TextWriter writer, object dateTime)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | dateTime |
WriteDateTimeOffset(TextWriter, Object)
Declaration
public void WriteDateTimeOffset(TextWriter writer, object oDateTimeOffset)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | oDateTimeOffset |
WriteNullableDateTimeOffset(TextWriter, Object)
Declaration
public void WriteNullableDateTimeOffset(TextWriter writer, object dateTimeOffset)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | dateTimeOffset |
WriteTimeSpan(TextWriter, Object)
Declaration
public void WriteTimeSpan(TextWriter writer, object oTimeSpan)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | oTimeSpan |
WriteNullableTimeSpan(TextWriter, Object)
Declaration
public void WriteNullableTimeSpan(TextWriter writer, object oTimeSpan)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | oTimeSpan |
WriteGuid(TextWriter, Object)
Declaration
public void WriteGuid(TextWriter writer, object oValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | oValue |
WriteNullableGuid(TextWriter, Object)
Declaration
public void WriteNullableGuid(TextWriter writer, object oValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | oValue |
WriteBytes(TextWriter, Object)
Declaration
public void WriteBytes(TextWriter writer, object oByteValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | oByteValue |
WriteChar(TextWriter, Object)
Declaration
public void WriteChar(TextWriter writer, object charValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | charValue |
WriteByte(TextWriter, Object)
Declaration
public void WriteByte(TextWriter writer, object byteValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | byteValue |
WriteSByte(TextWriter, Object)
Declaration
public void WriteSByte(TextWriter writer, object sbyteValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | sbyteValue |
WriteInt16(TextWriter, Object)
Declaration
public void WriteInt16(TextWriter writer, object intValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | intValue |
WriteUInt16(TextWriter, Object)
Declaration
public void WriteUInt16(TextWriter writer, object intValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | intValue |
WriteInt32(TextWriter, Object)
Declaration
public void WriteInt32(TextWriter writer, object intValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | intValue |
WriteUInt32(TextWriter, Object)
Declaration
public void WriteUInt32(TextWriter writer, object uintValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | uintValue |
WriteInt64(TextWriter, Object)
Declaration
public void WriteInt64(TextWriter writer, object integerValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | integerValue |
WriteUInt64(TextWriter, Object)
Declaration
public void WriteUInt64(TextWriter writer, object ulongValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | ulongValue |
WriteBool(TextWriter, Object)
Declaration
public void WriteBool(TextWriter writer, object boolValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | boolValue |
WriteFloat(TextWriter, Object)
Declaration
public void WriteFloat(TextWriter writer, object floatValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | floatValue |
WriteDouble(TextWriter, Object)
Declaration
public void WriteDouble(TextWriter writer, object doubleValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | doubleValue |
WriteDecimal(TextWriter, Object)
Declaration
public void WriteDecimal(TextWriter writer, object decimalValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | decimalValue |
WriteEnum(TextWriter, Object)
Declaration
public void WriteEnum(TextWriter writer, object enumValue)
Parameters
Type | Name |
---|
System.IO.TextWriter | writer |
System.Object | enumValue |
GetParseFn<T>()
Declaration
public ParseStringDelegate GetParseFn<T>()
Returns
ServiceStack.Text.Common.ParseStringDelegate
Type Parameters
GetParseStringSpanFn<T>()
Declaration
public ParseStringSpanDelegate GetParseStringSpanFn<T>()
Returns
ServiceStack.Text.Common.ParseStringSpanDelegate
Type Parameters
GetParseFn(Type)
Declaration
public ParseStringDelegate GetParseFn(Type type)
Returns
ServiceStack.Text.Common.ParseStringDelegate
Parameters
GetParseStringSpanFn(Type)
Declaration
public ParseStringSpanDelegate GetParseStringSpanFn(Type type)
Returns
ServiceStack.Text.Common.ParseStringSpanDelegate
Parameters
ParseRawString(String)
Declaration
public string ParseRawString(string value)
Returns
System.String
Parameters
Type | Name |
---|
System.String | value |
ParseString(ReadOnlySpan<Char>)
Declaration
public string ParseString(ReadOnlySpan<char> value)
Returns
System.String
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
ParseString(String)
Declaration
public string ParseString(string value)
Returns
System.String
Parameters
Type | Name |
---|
System.String | value |
IsEmptyMap(ReadOnlySpan<Char>, Int32)
Declaration
public static bool IsEmptyMap(ReadOnlySpan<char> value, int i = 1)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | i |
UnescapeString(String)
Declaration
public string UnescapeString(string value)
Returns
System.String
Parameters
Type | Name |
---|
System.String | value |
UnescapeString(ReadOnlySpan<Char>)
Declaration
public ReadOnlySpan<char> UnescapeString(ReadOnlySpan<char> value)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
UnescapeStringAsObject(ReadOnlySpan<Char>)
Declaration
public object UnescapeStringAsObject(ReadOnlySpan<char> value)
Returns
System.Object
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
UnescapeSafeString(String)
Declaration
public string UnescapeSafeString(string value)
Returns
System.String
Parameters
Type | Name |
---|
System.String | value |
UnescapeSafeString(ReadOnlySpan<Char>)
Declaration
public ReadOnlySpan<char> UnescapeSafeString(ReadOnlySpan<char> value)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
UnescapeJsString(ReadOnlySpan<Char>, Char)
Declaration
public static ReadOnlySpan<char> UnescapeJsString(ReadOnlySpan<char> json, char quoteChar)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | json |
System.Char | quoteChar |
UnescapeJsString(ReadOnlySpan<Char>, Char, Boolean, Int32)
Declaration
public static SpanIndex UnescapeJsString(ReadOnlySpan<char> json, char quoteChar, bool removeQuotes, int index)
Returns
ServiceStack.Text.Json.SpanIndex
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | json |
System.Char | quoteChar |
System.Boolean | removeQuotes |
System.Int32 | index |
Unescape(String)
Declaration
public static string Unescape(string input)
Returns
System.String
Parameters
Type | Name |
---|
System.String | input |
Unescape(String, Boolean)
Declaration
public static string Unescape(string input, bool removeQuotes)
Returns
System.String
Parameters
Type | Name |
---|
System.String | input |
System.Boolean | removeQuotes |
Unescape(ReadOnlySpan<Char>)
Declaration
public static ReadOnlySpan<char> Unescape(ReadOnlySpan<char> input)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | input |
Unescape(ReadOnlySpan<Char>, Boolean)
Declaration
public static ReadOnlySpan<char> Unescape(ReadOnlySpan<char> input, bool removeQuotes)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | input |
System.Boolean | removeQuotes |
Unescape(ReadOnlySpan<Char>, Boolean, Char)
Declaration
public static ReadOnlySpan<char> Unescape(ReadOnlySpan<char> input, bool removeQuotes, char quoteChar)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | input |
System.Boolean | removeQuotes |
System.Char | quoteChar |
ConvertFromUtf32(Int32)
Given a character as utf32, returns the equivalent string provided that the character
is legal json.
Declaration
public static string ConvertFromUtf32(int utf32)
Returns
System.String
Parameters
Type | Name |
---|
System.Int32 | utf32 |
EatTypeValue(String, ref Int32)
Declaration
public string EatTypeValue(string value, ref int i)
Returns
System.String
Parameters
Type | Name |
---|
System.String | value |
System.Int32 | i |
EatTypeValue(ReadOnlySpan<Char>, ref Int32)
Declaration
public ReadOnlySpan<char> EatTypeValue(ReadOnlySpan<char> value, ref int i)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | i |
EatMapStartChar(String, ref Int32)
Declaration
public bool EatMapStartChar(string value, ref int i)
Returns
System.Boolean
Parameters
Type | Name |
---|
System.String | value |
System.Int32 | i |
EatMapStartChar(ReadOnlySpan<Char>, ref Int32)
Declaration
public bool EatMapStartChar(ReadOnlySpan<char> value, ref int i)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | i |
EatMapKey(String, ref Int32)
Declaration
public string EatMapKey(string value, ref int i)
Returns
System.String
Parameters
Type | Name |
---|
System.String | value |
System.Int32 | i |
EatMapKey(ReadOnlySpan<Char>, ref Int32)
Declaration
public ReadOnlySpan<char> EatMapKey(ReadOnlySpan<char> value, ref int i)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | i |
EatMapKeySeperator(String, ref Int32)
Declaration
public bool EatMapKeySeperator(string value, ref int i)
Returns
System.Boolean
Parameters
Type | Name |
---|
System.String | value |
System.Int32 | i |
EatMapKeySeperator(ReadOnlySpan<Char>, ref Int32)
Declaration
public bool EatMapKeySeperator(ReadOnlySpan<char> value, ref int i)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | i |
EatItemSeperatorOrMapEndChar(String, ref Int32)
Declaration
public bool EatItemSeperatorOrMapEndChar(string value, ref int i)
Returns
System.Boolean
Parameters
Type | Name |
---|
System.String | value |
System.Int32 | i |
EatItemSeperatorOrMapEndChar(ReadOnlySpan<Char>, ref Int32)
Declaration
public bool EatItemSeperatorOrMapEndChar(ReadOnlySpan<char> value, ref int i)
Returns
System.Boolean
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | i |
EatWhitespace(ReadOnlySpan<Char>, ref Int32)
Declaration
public void EatWhitespace(ReadOnlySpan<char> value, ref int i)
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | i |
EatWhitespace(String, ref Int32)
Declaration
public void EatWhitespace(string value, ref int i)
Parameters
Type | Name |
---|
System.String | value |
System.Int32 | i |
EatValue(String, ref Int32)
Declaration
public string EatValue(string value, ref int i)
Returns
System.String
Parameters
Type | Name |
---|
System.String | value |
System.Int32 | i |
EatValue(ReadOnlySpan<Char>, ref Int32)
Declaration
public ReadOnlySpan<char> EatValue(ReadOnlySpan<char> value, ref int i)
Returns
ReadOnlySpan<System.Char>
Parameters
Type | Name |
---|
ReadOnlySpan<System.Char> | value |
System.Int32 | i |
Implements