use of com.serotonin.json.type.JsonValue in project ma-core-public by infiniteautomation.
the class MapConverter method jsonRead.
@Override
public void jsonRead(JsonReader reader, JsonValue jsonValue, Object obj, Type type) throws JsonException {
JsonObject jsonObject = (JsonObject) jsonValue;
@SuppressWarnings("unchecked") Map<Object, Object> map = (Map<Object, Object>) obj;
Type valueType = TypeUtils.getActualTypeArgument(type, 1);
for (Map.Entry<String, JsonValue> entry : jsonObject.entrySet()) map.put(entry.getKey(), reader.read(valueType, entry.getValue()));
}
Aggregations