Added ability to write data that is already json encoded