API Documentation (v0.9.0-alpha)

Avolutions\Util\JsonHelper

Provides helper methods to handle JSON.

Methods

Method Visibility Description
decode() public Decodes a JSON string or a JSON file.

Method Details

decode()

Decodes a JSON string or a JSON file.

public static decode(string $jsonOrFilename[, bool $array = false ]) : mixed
Parameters

string $jsonOrFilename
Either a JSON string or the path to a JSON file.

bool $array (optional)
When true, JSON will be returned as associative array. When false, JSON will be returned as object.

Return values
mixed Decodes a JSON string or a JSON file.