Created
January 26, 2024 09:38
-
-
Save thistehneisen/dec14e6ea7d1399ca094a1178daa132b to your computer and use it in GitHub Desktop.
Create a deeply nested JSON string
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
def create_nested_json_string(depth): | |
json_string = '{"a":' * depth + '1' + '}' * depth | |
return json_string | |
depth = 10000 | |
nested_json = create_nested_json_string(depth) | |
print(nested_json) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment