code: private Polygon asPolygon(List<List<List>> coords, CrsId crsId) throws IOException {
          if (coords == null || coords.isEmpty()) {
              throw new IOException("A polygon requires the specification of its outer ring");
          }
          List<LinearRing> rings = new ArrayList<LinearRing>();
          try { 
          for (List<List> ring : coords) {
              PointSequence ringCoords = getPointSequence(ring, crsId);
              rings.add(new LinearRing(ringCoords));
          }
              return new Polygon(rings.toArray(new LinearRing[]{}));
          } catch (IllegalArgumentException e) {
              throw new IOException("Invalid Polygon: " + e.getMessage(), e);
          }
  
      }
docs: Parses the JSON as a polygon geometry
  
  
  @param coords the coordinate array corresponding with the polygon (a list containing rings, each of which
  contains a list of coordinates (which in turn are lists of numbers)).
  @param crsId
  @return An instance of polygon
  @throws IOException if the given json does not correspond to a polygon or can be parsed as such.