layout: default title: JSON
The json method outputs pretty-printed JSON to the terminal:
json
$climate->json([ 'name' => 'Gary', 'age' => 52, 'job' => 'Engineer', ]);
{ "name": "Gary", "age": 52, "job": "Engineer" }