pock

JsonEncoderTrait

Wraps json_encode() and converts encoding failures to JsonException.

Tags
category

JsonEncoderTrait

Table of Contents

Methods

jsonEncode()  : string
json_encode which throws exception on error.

Methods

jsonEncode()

json_encode which throws exception on error.

public static jsonEncode(mixed $data[, int $flags = 0 ][, int $depth = 512 ]) : string
Parameters
$data : mixed
$flags : int = 0
$depth : int = 512
Tags
throws
JsonException
Return values
string
On this page

Search results