Skip to main content

JsonObject

Assembly: ServiceStack.Text.dll
View Source
Declaration
public class JsonObject : Dictionary<string, string>, IDictionary<string, string>, ICollection<KeyValuePair<string, string>>, IDictionary, ICollection, IReadOnlyDictionary<string, string>, IReadOnlyCollection<KeyValuePair<string, string>>, ISerializable, IDeserializationCallback, IEnumerable<KeyValuePair<string, string>>, IEnumerable

Properties

Item[String]

Get JSON string value

View Source
Declaration
public string this[string key] { get; set; }

Methods

GetEnumerator()

View Source
Declaration
public Dictionary<string, string>.Enumerator GetEnumerator()
Returns

System.Collections.Generic.Dictionary<System.String,System.String>.Enumerator

IEnumerable<KeyValuePair<String, String>>.GetEnumerator()

View Source
Declaration
IEnumerator<KeyValuePair<string, string>> IEnumerable<KeyValuePair<string, string>>.GetEnumerator()
Returns

System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String,System.String>>

ToUnescapedDictionary()

View Source
Declaration
public Dictionary<string, string> ToUnescapedDictionary()
Returns

System.Collections.Generic.Dictionary<System.String,System.String>

Parse(String)

View Source
Declaration
public static JsonObject Parse(string json)
Returns

ServiceStack.Text.JsonObject

Parameters
TypeName
System.Stringjson

ParseArray(String)

View Source
Declaration
public static JsonArrayObjects ParseArray(string json)
Returns

ServiceStack.Text.JsonArrayObjects

Parameters
TypeName
System.Stringjson

ArrayObjects(String)

View Source
Declaration
public JsonArrayObjects ArrayObjects(string propertyName)
Returns

ServiceStack.Text.JsonArrayObjects

Parameters
TypeName
System.StringpropertyName

Object(String)

View Source
Declaration
public JsonObject Object(string propertyName)
Returns

ServiceStack.Text.JsonObject

Parameters
TypeName
System.StringpropertyName

GetUnescaped(String)

Get unescaped string value

View Source
Declaration
public string GetUnescaped(string key)
Returns

System.String

Parameters
TypeName
System.Stringkey

Child(String)

Get unescaped string value

View Source
Declaration
public string Child(string key)
Returns

System.String

Parameters
TypeName
System.Stringkey

WriteValue(TextWriter, Object)

Write JSON Array, Object, bool or number values as raw string

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

ConvertTo<T>()

View Source
Declaration
public T ConvertTo<T>()
Returns

<T>

Type Parameters
  • T

ConvertTo(Type)

View Source
Declaration
public object ConvertTo(Type type)
Returns

System.Object

Parameters
TypeName
System.Typetype

Implements

  • System.Collections.Generic.IDictionary<System.String,System.String>
  • System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.String>>
  • System.Collections.IDictionary
  • System.Collections.ICollection
  • System.Collections.Generic.IReadOnlyDictionary<System.String,System.String>
  • System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<System.String,System.String>>
  • System.Runtime.Serialization.ISerializable
  • System.Runtime.Serialization.IDeserializationCallback
  • System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String,System.String>>
  • System.Collections.IEnumerable