forked from carvel-dev/ytt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add indent with multiline to json.encode
- allow json.encode to receive an indent named argument: ``` json.encode('{"a":"b"}', indent=2) ``` - indent greater than 0 indicates the json shall be rendered as a multiline string indented with the specified number of spaces - indent=0 and omitting indent both result in a single line json string - errors are returned if indent > 4 or if arguments other than indent are included Issue carvel-dev#410 Co-authored-by: Tyler Schultz <[email protected]>
- Loading branch information
1 parent
357b87d
commit 0bad57f
Showing
3 changed files
with
94 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters