public Map<K, V> read(JsonReader in) throws IOException { JsonToken peek = in.peek(); if (peek == JsonToken.NULL) { in.nextNull(); return null; } Map<K, V> map = (Map) this.constructor.construct(); K key; if (peek == JsonToken.BEGIN_ARRAY) { in.beginArray(); while (in.hasNext()) { in.beginArray(); key = this.keyTypeAdapter.read(in); if (map.put(key, this.valueTypeAdapter.read(in)) != null) { throw new JsonSyntaxException("duplicate key: " + key); } in.endArray(); } in.endArray(); return map; } in.beginObject(); while (in.hasNext()) { JsonReaderInternalAccess.INSTANCE.promoteNameToValue(in); key = this.keyTypeAdapter.read(in); if (map.put(key, this.valueTypeAdapter.read(in)) != null) { throw new JsonSyntaxException("duplicate key: " + key); } } in.endObject(); return map; }
public Map a(JsonReader jsonreader) { JsonToken jsontoken = jsonreader.peek(); if (jsontoken == JsonToken.NULL) { jsonreader.nextNull(); return null; } Map map = (Map)d.construct(); if (jsontoken == JsonToken.BEGIN_ARRAY) { jsonreader.beginArray(); for (; jsonreader.hasNext(); jsonreader.endArray()) { jsonreader.beginArray(); Object obj1 = b.read(jsonreader); if (map.put(obj1, c.read(jsonreader)) != null) { throw new JsonSyntaxException((new StringBuilder()).append("duplicate key: ").append(obj1).toString()); } } jsonreader.endArray(); return map; } jsonreader.beginObject(); while (jsonreader.hasNext()) { JsonReaderInternalAccess.INSTANCE.promoteNameToValue(jsonreader); Object obj = b.read(jsonreader); if (map.put(obj, c.read(jsonreader)) != null) { throw new JsonSyntaxException((new StringBuilder()).append("duplicate key: ").append(obj).toString()); } } jsonreader.endObject(); return map; }