You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe it is because the matcher is attempting to normalize the json into a linked hash map, but the map type adapter doesn't know how to convert a standard array into a map. The below code shows how the MapTypeAdapterFactory assumes the payload would be an array of arrays but instead is getting an array of objects...
if (peek == JsonToken.BEGIN_ARRAY) {
in.beginArray();
while (in.hasNext()) {
in.beginArray(); // entry array
K key = keyTypeAdapter.read(in);
V value = valueTypeAdapter.read(in);
V replaced = map.put(key, value);
if (replaced != null) {
throw new JsonSyntaxException("duplicate key: " + key);
}
in.endArray();
}
in.endArray();
}
The text was updated successfully, but these errors were encountered:
The following code fails when trying to verify a json body that starts with an array.
I believe it is because the matcher is attempting to normalize the json into a linked hash map, but the map type adapter doesn't know how to convert a standard array into a map. The below code shows how the
MapTypeAdapterFactory
assumes the payload would be an array of arrays but instead is getting an array of objects...The text was updated successfully, but these errors were encountered: