Added canWriteJson test