Skip to content

Kirby 6.0.0

$collection->toJson()

Converts the object into a JSON string

$collection->toJson(): string

Return type

string

Exceptions

Type Description
JsonException for invalid JSON

Parent class

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