JsonEncoder Class

Summary

This class encodes and decodes JSON strings. Spec. details, see http://www.json.org/ JSON uses Arrays and Objects. These correspond here to the datatypes JsonArray(IList<object>) and JsonObject(IDictionary<string,object>). All numbers are parsed to doubles.
Assembly
Cake.Http.dll
Namespace
Cake.Http
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["JsonEncoder"] class Type type-node

Syntax

public static class JsonEncoder

Attributes

Type Description
GeneratedCodeAttribute

Properties

Methods

Name Value Summary
DeserializeObject(string, Type, IJsonSerializerStrategy) object
static
DeserializeObject(string, Type) object
static
DeserializeObject(string) object
Parses the string json into a value
static
DeserializeObject<T>(string, IJsonSerializerStrategy) T
static
DeserializeObject<T>(string) T
static
EscapeToJavascriptString(string) string
static
SerializeObject(object, bool) string
static
SerializeObject(object, IJsonSerializerStrategy) string
Converts a IDictionary<string,object> / IList<object> object into a JSON string
static
TryDeserializeObject(string, object) bool
Try parsing the json string into a value.
static

Extension Methods

Name Value Summary
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin