Meilisearch PHP | Documentation

Json
in package
implements SerializerInterface

Table of Contents

Interfaces

SerializerInterface

Constants

JSON_DECODE_ERROR_MESSAGE  = 'Decoding payload to json failed: "%s".'
JSON_ENCODE_ERROR_MESSAGE  = 'Encoding payload to json failed: "%s".'

Methods

serialize()  : string|bool
Serialize data into string.
unserialize()  : string|int|float|bool|array<string|int, mixed>|null
Unserialize the given string.

Constants

JSON_DECODE_ERROR_MESSAGE

private mixed JSON_DECODE_ERROR_MESSAGE = 'Decoding payload to json failed: "%s".'

JSON_ENCODE_ERROR_MESSAGE

private mixed JSON_ENCODE_ERROR_MESSAGE = 'Encoding payload to json failed: "%s".'

Methods

serialize()

Serialize data into string.

public serialize(mixed $data) : string|bool
Parameters
$data : mixed
Return values
string|bool

unserialize()

Unserialize the given string.

public unserialize(string $string) : string|int|float|bool|array<string|int, mixed>|null
Parameters
$string : string
Return values
string|int|float|bool|array<string|int, mixed>|null

        
On this page

Search results