Skip to content

Instantly share code, notes, and snippets.

@mattn
Created February 17, 2009 08:17
Show Gist options
  • Select an option

  • Save mattn/65634 to your computer and use it in GitHub Desktop.

Select an option

Save mattn/65634 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use JSON::XS;
my $data = {
#text => "Foo[\xe2\x80\xa8]Bar"
text => "Foo[\x{2028}]Bar"
};
print JSON::XS->new->ascii->encode($data)."\n";
print JSON::XS->new->encode($data)."\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment