Composer API
Class

Composer\Json\JsonFormatter

class JsonFormatter

Formats json strings used for php < 5.4 because the jsonencode doesn't supports the flags JSONUNESCAPEDSLASHES | JSONPRETTYPRINT | JSONUNESCAPED_UNICODE in these versions

Methods

static string format(string $json, bool $unescapeUnicode, bool $unescapeSlashes)

This code is based on the function found at: http://recursive-design.com/blog/2008/03/11/format-json-with-php/

Details

at line 37
static public string format(string $json, bool $unescapeUnicode, bool $unescapeSlashes)

This code is based on the function found at: http://recursive-design.com/blog/2008/03/11/format-json-with-php/

Originally licensed under MIT by Dave Perrett mail@recursive-design.com

Parameters

string $json
bool $unescapeUnicode Un escape unicode
bool $unescapeSlashes Un escape slashes

Return Value

string