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

also change toJson function to accomodate passing in of number of spaces
the old stuff was wrong too --- if anything it should be `pretty === true ? 2 : pretty`