A set of aliases to help with JSON Serialization
#addin nuget:?package=Cake.Json&version=7.0.1
dotnet add package Cake.Json --version 7.0.1
<PackageReference Include="Cake.Json" Version="7.0.1" />
Aliases
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 |
Deserializes the JSON from a string. |
Deserialize |
Deserializes the JSON from a file. |
ParseJson |
Parses the JSON into a JObject. |
ParseJsonFromFile |
Parses the file contents into a JObject. |
SerializeJson |
Serializes an object to a JSON string. |
SerializeJsonPretty |
Serializes an object to a pretty JSON string. |
SerializeJsonToFile |
Serializes an object to a JSON file. |
Serialize |
Serializes an object to a pretty JSON file. |