some cleanup in writejson.rules
remove some properties before object creation