XOOPS  2.6.0
Xoops\Core\JsonFormatter Class Reference

Static Public Member Functions

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

Detailed Description

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

Author
Konstantin Kudryashiv ever..nosp@m.zet@.nosp@m.gmail.nosp@m..com
Jordi Boggiano j.bog.nosp@m.gian.nosp@m.o@sel.nosp@m.d.be

Definition at line 24 of file JsonFormatter.php.

Member Function Documentation

static Xoops\Core\JsonFormatter::format (   $json,
  $unescapeUnicode,
  $unescapeSlashes 
)
static

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@.nosp@m.recu.nosp@m.rsive.nosp@m.-des.nosp@m.ign.c.nosp@m.om

Parameters
string$json
bool$unescapeUnicodeUn escape unicode
bool$unescapeSlashesUn escape slashes
Returns
string

Definition at line 39 of file JsonFormatter.php.

References $i, $j, $l, and $result.


The documentation for this class was generated from the following file: