Json

Summary

JSON related cake aliases.

In order to use aliases from this addin, you will need to also reference Newtonsoft.Json as an addin. Here is what including Cake.Json in your script should look like:

#addin package:?Cake.Json
#addin package:?Newtonsoft.Json&version=11.0.2

General

DeserializeJson<T>(ICakeContext, string) Deserializes the JSON from a string.
Addin from Cake.Json.dll
DeserializeJsonFromFile<T>(ICakeContext, FilePath) Deserializes the JSON from a file.
Addin from Cake.Json.dll
ParseJson(ICakeContext, string) Parses the JSON into a JObject.
Addin from Cake.Json.dll
ParseJsonFromFile(ICakeContext, FilePath) Parses the file contents into a JObject.
Addin from Cake.Json.dll
SerializeJson<T>(ICakeContext, T) Serializes an object to a JSON string.
Addin from Cake.Json.dll
SerializeJsonPretty<T>(ICakeContext, T) Serializes an object to a pretty JSON string.
Addin from Cake.Json.dll
SerializeJsonToFile<T>(ICakeContext, FilePath, T) Serializes an object to a JSON file.
Addin from Cake.Json.dll
SerializeJsonToPrettyFile<T>(ICakeContext, FilePath, T) Serializes an object to a pretty JSON file.
Addin from Cake.Json.dll