Skip to content

Instantly share code, notes, and snippets.

@zentooo
Created September 15, 2010 17:31
Show Gist options
  • Save zentooo/581100 to your computer and use it in GitHub Desktop.
Save zentooo/581100 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use YAML::XS;
use JSON::XS;
use Path::Class;
use Encode;
my $path = shift @ARGV;
my $obj = Load(decode('utf8', file($path)->slurp));
my $json = JSON::XS->new;
print $json->pretty->encode($obj);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment