Skip to content

Commit

Permalink
ensure color and common always arrays
Browse files Browse the repository at this point in the history
always pretty print JSON
  • Loading branch information
JohnRDOrazio committed May 10, 2022
1 parent 5638ec6 commit a837f7b
Show file tree
Hide file tree
Showing 5 changed files with 477 additions and 340 deletions.
4 changes: 2 additions & 2 deletions LitCalRegionalData.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private function writeRegionalCalendar() {
if( property_exists( $this->DATA, 'Overrides' ) ) {
$CalData->Overrides = $this->DATA->Overrides;
}
$this->RESPONSE->Calendar = json_encode( $CalData );
$this->RESPONSE->Calendar = json_encode( $CalData, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE );
if( property_exists( $this->DATA, 'group' ) ) {
$this->RESPONSE->Group = strip_tags( $this->DATA->group );
}
Expand Down Expand Up @@ -266,7 +266,7 @@ private function createOrUpdateIndex( string $path, bool $delete = false ) {
}
}

file_put_contents( "nations/index.json", json_encode( $this->GeneralIndex ) . PHP_EOL );
file_put_contents( "nations/index.json", json_encode( $this->GeneralIndex, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE ) . PHP_EOL );
}

public function Init() {
Expand Down

0 comments on commit a837f7b

Please sign in to comment.