Adventure Documentation

JSON extends PlatformUtility
in package

Provides access to JSON utility functions.

Tags

Table of Contents

encode()  : string
Encode a variable into a json string.
parse()  : array<string|int, mixed>
Parse a json string into an associative array.

Methods

encode()

Encode a variable into a json string.

public encode(mixed $value) : string
Parameters
$value : mixed
Tags
throws
JsonException
see
json_encode()
Return values
string

parse()

Parse a json string into an associative array.

public parse(string $string) : array<string|int, mixed>
Parameters
$string : string
Tags
throws
JsonException
see
json_decode()
Return values
array<string|int, mixed>

        

Search results