Made pretty print optional for JSON functions. Fixed broken unit test