Added visitor and changed the to json string interface