1 package Config::Any::JSON;
8 Config::Any::JSON - Load JSON config files
12 Loads JSON files. Example:
28 return an array of valid extensions (C<json>, C<jsn>).
33 return qw( json jsn );
38 Attempts to load C<$file> as a JSON file.
46 open( my $fh, $file ) or die $!;
47 my $content = do { local $/; <$fh> };
50 eval { require JSON::Syck; };
53 return JSON::jsonToObj( $content );
56 return JSON::Syck::Load( $content );
64 =item * Brian Cassidy E<lt>bricas@cpan.orgE<gt>
68 =head1 COPYRIGHT AND LICENSE
70 Copyright 2006 by Brian Cassidy
72 This library is free software; you can redistribute it and/or modify
73 it under the same terms as Perl itself.
81 =item * L<Config::Any>