#!/usr/bin/perl

use strict;
use warnings;
use JSON::PP;

while( <> ) {
    if( /^\{.*\}$/ ) {
        my $json = JSON::PP->new->decode( $_ );
        print JSON::PP->new->canonical->indent->encode( $json );
    } else {
        print $_;
    }
}
