@Override
        public Double deserialize(final JsonParser jsonParser, final DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
            if (jsonParser.getCurrentToken().isNumeric())
                return jsonParser.getDoubleValue();
            else  {
                final String numberText = jsonParser.getValueAsString();
                if ("NaN".equalsIgnoreCase(numberText))
                    return Double.NaN;
                else if ("-Infinity".equals(numberText) || "-INF".equalsIgnoreCase(numberText))
                    return Double.NEGATIVE_INFINITY;
                else if ("Infinity".equals(numberText) || "INF".equals(numberText))
                    return Double.POSITIVE_INFINITY;
                else
                    throw new IllegalStateException("Double value unexpected: " + numberText);
            }

        }
Maps in the JVM can have {@link Object} as a key, but in JSON they must be a {@link String}.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2.java