mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-23 19:47:04 -04:00
Refactor PHP.
This commit is contained in:
parent
35df02984b
commit
41bb7d76b5
1 changed files with 2 additions and 2 deletions
|
@ -18,12 +18,12 @@ class Json {
|
|||
return file_put_contents($path, $json) !== false;
|
||||
}
|
||||
|
||||
public static function decode($json) {
|
||||
private static function decode($json) {
|
||||
$json = Json::strip($json);
|
||||
return json_decode($json, true);
|
||||
}
|
||||
|
||||
public static function strip($commented_json) {
|
||||
private static function strip($commented_json) {
|
||||
$insideString = false;
|
||||
$insideComment = false;
|
||||
$json = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue