JsonAliases.

SerializeJson<T>(ICakeContext, T) Method

Summary

Serializes an object to a JSON string.
Assembly
Cake.Json.dll
Namespace
Cake.Json
Containing Type
JsonAliases

Syntax

public static string SerializeJson<T>(this ICakeContext context, T instance)

Attributes

Type Description
CakeMethodAliasAttribute

Type Parameters

Name Description
T The type of object to serialize.

Parameters

Name Type Description
context ICakeContext The context.
instance T The object to serialize.

Return Value

Type Description
string The JSON string.