Skip Menu |
 

This queue is for tickets about the File-JSON-Slurper CPAN distribution.

Report information
The Basics
Id: 125486
Status: new
Priority: 0/
Queue: File-JSON-Slurper

People
Owner: Nobody in particular
Requestors: DBOOK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Double-encoding and decoding
Download (untitled) / with headers
text/plain 624b
This module currently double-encodes all output and double-decodes all input by default. The standard (and now RFC-required) practice with JSON is that it should always be encoded to UTF-8, so the most efficient/correct way to do this would be: sub read_json { my $json = read_binary(@_); return decode_json($json); } sub write_json { my ($filename, $ref) = @_; my $json = encode_json($ref); return write_binary($filename, $json); } However, this removes the feature of allowing encoding to be specified. Any implementation that allows encoding to be specified will be slower. Do we need this option?


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.