The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
use JSON::Syck;
use Test::More tests => 1;

my $dump = JSON::Syck::Dump( { a => "hello\nworld\n" } );
is $dump, q({"a":"hello\nworld\n"});