Skip to content

Instantly share code, notes, and snippets.

View robobario's full-sized avatar

Robert Young robobario

  • Red Hat
  • New Zealand
View GitHub Profile
@robobario
robobario / permuter.py
Created May 23, 2017 22:25
A script that takes a valid json file and permute garbage into it to generate test data
#!/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])]