converting vertices faces to json polygons