# $taxRules->toJson()

> Converts the object into a JSON string

- Source: `src/Toolkit/Collection.php#L1162` <https://github.com/getkirby/kirby/blob/6.0.0-beta.1/src/Toolkit/Collection.php#L1162>
- Inherited from Kirby, not part of the Merx API. See <https://getkirby.com/docs/reference>.

```php
$taxRules->toJson(): string
```

## Return type

`string`

## Exceptions

| Type | Description |
| --- | --- |
| `\JsonException` | for invalid JSON |

## Parent class

`Wagnerwagner\Merx\TaxRules` inherited from `Kirby\Toolkit\Collection`
