Skip to content

Instantly share code, notes, and snippets.

@lemire
Created November 23, 2018 19:02
Show Gist options
  • Save lemire/9600a0fc49a956622c18dd6d95d86c53 to your computer and use it in GitHub Desktop.
Save lemire/9600a0fc49a956622c18dd6d95d86c53 to your computer and use it in GitHub Desktop.
Nested JSON generator (in Python)
import sys
depth = int(sys.argv[1])
s=""
for j in range(depth):
s+="["
s+="true"
for j in range(depth):
s+="]"
print(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment