writeJson added