feat(jsonFilter): add optional arg to define custom indentation

also change toJson function to accomodate passing in of number of spaces
I don't really like how we're using `toJson` to test the output from `toJson` -.-