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

also change toJson function to accomodate passing in of number of spaces
honestly this should just be `JSON.stringify(obj, toJsonReplacer, pretty);` --- browsers don't care if `pretty` is null or undefined or the empty string