protected static Map<String, String> toMap(final JsonValueContainer<JsonField> jsonObject) { checkNotNull(jsonObject, "JSON object"); final Map<String, String> result = new HashMap<>(jsonObject.getSize()); jsonObject.forEach(jsonField -> { final JsonValue jsonValue = jsonField.getValue(); final String stringValue = jsonValue.isString() ? jsonValue.asString() : jsonValue.toString(); result.put(jsonField.getKeyName(), stringValue); }); return result; }
protected static Map<String, String> toMap(final JsonValueContainer<JsonField> jsonObject) { checkNotNull(jsonObject, "JSON object"); final Map<String, String> result = new HashMap<>(jsonObject.getSize()); jsonObject.forEach(jsonField -> { final JsonValue jsonValue = jsonField.getValue(); final String stringValue = jsonValue.isString() ? jsonValue.asString() : jsonValue.toString(); result.put(jsonField.getKeyName(), stringValue); }); return result; }