\Composer\JsonJsonFormatter

Formats json strings used for php < 5.4 because the json_encode doesn't supports the flags JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE in these versions

Summary

Methods
Properties
Constants
format()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

format()

format(string  $json, boolean  $unescapeUnicode, boolean  $unescapeSlashes) : string

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
boolean $unescapeUnicode

Un escape unicode

boolean $unescapeSlashes

Un escape slashes

Returns

string