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

feature/json-control-indentation-spaces #1507

Merged

Conversation

njlr
Copy link
Contributor

@njlr njlr commented Apr 15, 2024

Allow user to control indentation when serializing JSON.

let text = """{"items":[{"id":"Open"},null,{"id":25}],"x":{"y":2},"z":[]}"""
let json = JsonValue.Parse text
json.ToString(indentationSpaces = 3)

An optional argument is used to keep things backward compatible.

@cartermp cartermp merged commit c5b026b into fsprojects:main Apr 21, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants