Help for this page

Select Code to Download


  1. or download this
    decode_json(encode_utf8($json))
    
  2. or download this
    from_json(decode_utf8(encode_utf8($json)))
    
  3. or download this
    use utf8;
    
    ...
    
    my $json = q({ "cat" : "text – abcd" });
    my $data = from_json($json);
    
  4. or download this
    use open ':std', ':encoding(UTF-8)';
    
    print($data->{cat}, "\n");
    
  5. or download this
    #!/usr/bin/perl
    
    ...
    my $json = q({ "cat" : "text – abcd" });
    my $data = from_json($json);
    print($data->{cat}, "\n");