Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

space_after doesn't add space after comma #89

Open
haukex opened this issue Apr 13, 2024 · 0 comments
Open

space_after doesn't add space after comma #89

haukex opened this issue Apr 13, 2024 · 0 comments

Comments

@haukex
Copy link

haukex commented Apr 13, 2024

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]}
@haukex haukex changed the title space_after doesn't do what is documented space_after doesn't add space after comma Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant