add writeJson