code: @Override
      public PolygonPoint[] deserialize(final JsonElement json, final Type typeOfT,
              final JsonDeserializationContext context) {
  
          final PolygonPoint[] points;
  
          if (json.isJsonArray()) {
  
              final JsonArray pointsJsonArray = json.getAsJsonArray();
              points = new PolygonPoint[pointsJsonArray.size()];
  
              for (int i = 0; i < pointsJsonArray.size(); i++) {
                  points[i] = context.deserialize(pointsJsonArray.get(i), PolygonPoint.class);
              }
          } else {
              throw new JsonParseException("Unexpected data: " + json.toString());
          }
  
          return points;
      }
docs: {@inheritDoc}
  
  @see com.google.gson.JsonDeserializer#deserialize(com.google.gson.JsonElement,
  java.lang.reflect.Type, com.google.gson.JsonDeserializationContext)