in src/main/java/org/opensearch/geospatial/GeospatialParser.java [22:32]
public static Map<String, Object> toStringObjectMap(Object input) {
if (!(input instanceof Map)) {
throw new IllegalArgumentException(input + " is not an instance of Map, but of type [ " + input.getClass().getName() + " ]");
}
Map<Object, Object> inputMap = (Map<Object, Object>) input;
Map<String, Object> stringObjectMap = new HashMap<>();
for (Map.Entry<Object, Object> entry : inputMap.entrySet()) {
stringObjectMap.put(entry.getKey().toString(), entry.getValue());
}
return stringObjectMap;
}