Json aliases

Cake.Json addin

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>(string)
Alias from Cake.Json addin
Deserializes the JSON from a string.
DeserializeJsonFromFile<T>(FilePath)
Alias from Cake.Json addin
Deserializes the JSON from a file.
ParseJson(string)
Alias from Cake.Json addin
Parses the JSON into a JObject.
ParseJsonFromFile(FilePath)
Alias from Cake.Json addin
Parses the file contents into a JObject.
SerializeJson<T>(T)
Alias from Cake.Json addin
Serializes an object to a JSON string.
SerializeJsonPretty<T>(T)
Alias from Cake.Json addin
Serializes an object to a pretty JSON string.
SerializeJsonToFile<T>(FilePath, T)
Alias from Cake.Json addin
Serializes an object to a JSON file.
SerializeJsonToPrettyFile<T>(FilePath, T)
Alias from Cake.Json addin
Serializes an object to a pretty JSON file.