Json reader and writer will not close the input/output stream