Skip to content

JSON.Stringify method (1 of 2)

Converts object to its JSON representation

public static string Stringify(object? value, bool writeNulls = false)
parameter description
value Value to convert to JSON
writeNulls If true, serializes null values.

Return Value

Serialized JSON string

See Also


JSON.Stringify method (2 of 2)

Converts object to its JSON representation

public static string Stringify(object? value, JsonSerializerOptions options)
parameter description
value Value to convert to JSON
options Serializer options.

Return Value

Serialized JSON string

See Also