Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Young robobario

  • adscale Labs
  • New Zealand
View GitHub Profile
@robobario
robobario / permuter.py
Created May 23, 2017
A script that takes a valid json file and permute garbage into it to generate test data
View permuter.py
#!/usr/bin/env python
import sys, json, copy;
data = json.load(sys.stdin)
def permute(data):
permutations = [None, "", "wubbalub-gibberish", 1, [], {}]
if isinstance(data, list):
if len(data) > 0:
inner = [[x] for x in permute(data[0])]