Skip to content

space_after doesn't add space after comma #89

@haukex

Description

@haukex

The documentation of the space_after option says that it "will add ... extra whitespace after the , separating key-value pairs and array members." However, it doesn't actually do this.

use warnings;
use strict;
use Cpanel::JSON::XS ();
use JSON::PP ();

print Cpanel::JSON::XS->new->utf8->space_after->encode({x=>[1,2]}), "\n";
print         JSON::PP->new->utf8->space_after->encode({x=>[1,2]}), "\n";

__END__

{"x": [1, 2]}
{"x": [1,2]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions