Skip to content

Maintain consistent JSON formatting #132

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

Merged
merged 1 commit into from
Jun 20, 2025

Conversation

bastelfreak
Copy link
Contributor

The JSON gem has historically included newlines when pretty printing
empty arrays or hashes. This changed with ruby/json@b2c4480 in JSON
2.8.0.

In order to maintain consistent behavior for our users, this commit
special cases empty array and hash facts and adds a new test for empty
hashes.

Contains #129. Cherry-picked from puppetlabs/puppet@295d2f9

@bastelfreak bastelfreak self-assigned this Jun 19, 2025
@bastelfreak bastelfreak added the bug Something isn't working label Jun 19, 2025
The JSON gem has historically included newlines when pretty printing
empty arrays or hashes. This changed with ruby/json@b2c4480 in JSON
2.8.0.

In order to maintain consistent behavior for our users, this commit
special cases empty array and hash facts and adds a new test for empty
hashes.
@bastelfreak bastelfreak merged commit dfcaa46 into OpenVoxProject:main Jun 20, 2025
9 of 10 checks passed
@bastelfreak bastelfreak deleted the json2 branch June 20, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants