Don't use json_encode directly

Also pass "true" to "isHtml", which reflects to prettify

Change-Id: Ifdefe4dc2bcccb06f4b13774b60c16a6c7066b1a
This commit is contained in:
Reedy
2012-08-12 17:01:18 +01:00
parent f8387a1e07
commit b696e24a99

View File

@@ -29,8 +29,8 @@ include __DIR__ . '/spyc.php';
$data = file_get_contents( 'langdb.yaml' ); $data = file_get_contents( 'langdb.yaml' );
$parsed = spyc_load( $data ); $parsed = spyc_load( $data );
$json = json_encode( $parsed ); $json = FormatJSON::encode( $parsed, true );
$languageNames = FormatJSON::encode( Language::fetchLanguageNames() ); $languageNames = FormatJSON::encode( Language::fetchLanguageNames(), true );
$js = <<<JAVASCRIPT $js = <<<JAVASCRIPT
( function ( $ ) { ( function ( $ ) {
$.uls = {}; $.uls = {};