| @@ 542-552 (lines=11) @@ | ||
| 539 | switch($char) |
|
| 540 | { |
|
| 541 | case '{': |
|
| 542 | case '[': |
|
| 543 | if ( ! $in_string) |
|
| 544 | { |
|
| 545 | $new_json .= $char.$newline.str_repeat($tab, $indent_level+1); |
|
| 546 | $indent_level++; |
|
| 547 | } |
|
| 548 | else |
|
| 549 | { |
|
| 550 | $new_json .= $char; |
|
| 551 | } |
|
| 552 | break; |
|
| 553 | case '}': |
|
| 554 | case ']': |
|
| 555 | if ( ! $in_string) |
|
| @@ 554-564 (lines=11) @@ | ||
| 551 | } |
|
| 552 | break; |
|
| 553 | case '}': |
|
| 554 | case ']': |
|
| 555 | if ( ! $in_string) |
|
| 556 | { |
|
| 557 | $indent_level--; |
|
| 558 | $new_json .= $newline.str_repeat($tab, $indent_level).$char; |
|
| 559 | } |
|
| 560 | else |
|
| 561 | { |
|
| 562 | $new_json .= $char; |
|
| 563 | } |
|
| 564 | break; |
|
| 565 | case ',': |
|
| 566 | if ( ! $in_string) |
|
| 567 | { |
|
| @@ 565-574 (lines=10) @@ | ||
| 562 | $new_json .= $char; |
|
| 563 | } |
|
| 564 | break; |
|
| 565 | case ',': |
|
| 566 | if ( ! $in_string) |
|
| 567 | { |
|
| 568 | $new_json .= ','.$newline.str_repeat($tab, $indent_level); |
|
| 569 | } |
|
| 570 | else |
|
| 571 | { |
|
| 572 | $new_json .= $char; |
|
| 573 | } |
|
| 574 | break; |
|
| 575 | case ':': |
|
| 576 | if ( ! $in_string) |
|
| 577 | { |
|