class JsonExtension extends AbstractExtension (View source)

Constants

SERIALIZE_GROUP

SERIALIZE_GROUP_DEFINITION

Methods

__construct(NormalizerInterface $normalizer)

No description

getFilters()

{@inheritdoc}

getTests()

{@inheritdoc}

string
jsonRecords($records, bool|null $includeDefinition = true, int $options = 0, string $locale = '')

No description

array
normalizeRecords($records, string $locale = '')

No description

bool
testJson(string $string)

Test whether a passed string contains valid JSON.

Details

__construct(NormalizerInterface $normalizer)

Parameters

NormalizerInterface $normalizer

getFilters()

{@inheritdoc}

getTests()

{@inheritdoc}

string jsonRecords($records, bool|null $includeDefinition = true, int $options = 0, string $locale = '')

Parameters

$records
bool|null $includeDefinition
int $options
string $locale

Return Value

string

array normalizeRecords($records, string $locale = '')

Parameters

$records
string $locale

Return Value

array

bool testJson(string $string)

Test whether a passed string contains valid JSON.

Parameters

string $string

Return Value

bool