Skip to content

Kirby 6.0.0

$blocks->toJson()

Converts the object into a JSON string

$blocks->toJson(): string

Return type

string

Exceptions

Type Description
JsonException for invalid JSON

Parent class

Kirby\Cms\Blocks inherited from Kirby\Toolkit\Collection