JsWriter
Assembly: ServiceStack.Text.dll
View Source
Declaration
public static class JsWriter
Fields
TypeAttr
View Source
Declaration
public const string TypeAttr = "__type"
MapStartChar
View Source
Declaration
public const char MapStartChar = '{'
MapKeySeperator
View Source
Declaration
public const char MapKeySeperator = ':'
ItemSeperator
View Source
Declaration
public const char ItemSeperator = ','
MapEndChar
View Source
Declaration
public const char MapEndChar = '}'
MapNullValue
View Source
Declaration
public const string MapNullValue = "\"\""
EmptyMap
View Source
Declaration
public const string EmptyMap = "{}"
ListStartChar
View Source
Declaration
public const char ListStartChar = '['
ListEndChar
View Source
Declaration
public const char ListEndChar = ']'
ReturnChar
View Source
Declaration
public const char ReturnChar = '\r'
LineFeedChar
View Source
Declaration
public const char LineFeedChar = '\n'
QuoteChar
View Source
Declaration
public const char QuoteChar = '"'
QuoteString
View Source
Declaration
public const string QuoteString = "\""
EscapedQuoteString
View Source
Declaration
public const string EscapedQuoteString = "\\\""
ItemSeperatorString
View Source
Declaration
public const string ItemSeperatorString = ","
MapKeySeperatorString
View Source
Declaration
public const string MapKeySeperatorString = ":"
CsvChars
View Source
Declaration
public static readonly char[] CsvChars
EscapeChars
View Source
Declaration
public static readonly char[] EscapeChars
Methods
WriteDynamic(Action)
View Source
Declaration
public static void WriteDynamic(Action callback)
Parameters
Type | Name |
---|---|
System.Action | callback |
HasAnyEscapeChars(String)
micro optimizations: using flags instead of value.IndexOfAny(EscapeChars)
View Source
Declaration
public static bool HasAnyEscapeChars(string value)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | value |
GetTypeSerializer<TSerializer>()
View Source
Declaration
public static ITypeSerializer GetTypeSerializer<TSerializer>()
Returns
ServiceStack.Text.Common.ITypeSerializer
Type Parameters
TSerializer
WriteEnumFlags(TextWriter, Object)
View Source
Declaration
public static void WriteEnumFlags(TextWriter writer, object enumFlagValue)
Parameters
Type | Name |
---|---|
System.IO.TextWriter | writer |
System.Object | enumFlagValue |
ShouldAllowRuntimeType(Type)
View Source
Declaration
public static bool ShouldAllowRuntimeType(Type type)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Type | type |
AssertAllowedRuntimeType(Type)
View Source
Declaration
public static void AssertAllowedRuntimeType(Type type)
Parameters
Type | Name |
---|---|
System.Type | type |