Create write2json.m