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

[node-core-library] Update the JsonFile API to better preserve the formatting of an existing JSON file while stringifying. #4464

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

iclanton
Copy link
Member

Summary

Fixes #4461

Details

Updates the updateString function to use json5 syntax instead of cjson, which will behave the same as cjson unless the existing string uses JSON5-specific constructs (trailing commas, unquoted properties, ...).

How it was tested

Added unit tests.

Impacted documentation

None.

@dmichon-msft dmichon-msft merged commit e0bc910 into microsoft:main Jan 2, 2024
5 checks passed
@iclanton iclanton deleted the json5-update branch January 8, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[@rushstack/node-core-library] use the JsonFile.save() update existing json5 syntax file error.
2 participants