Implemented json reader and writer and tests