Skip to content

API reference / Quittio \ Core \ Serialization

JsonSchemaValidator

final class in quittio/core

Quittio\Core\Serialization\JsonSchemaValidator · Source

Validates JSON input against the shipped invoice schema before hydration (requires the optional package opis/json-schema).

Methods#

MethodDescription
::available()
->validate()

available()#

public static function available(): bool

static

Returns
bool

validate()#

public function validate(string $json): list<string>
ParameterTypeDescription
$jsonstring
Returns
list<string> – errors as "path: message"; empty if valid

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.