GSON: JSON deserialization to variable type (List/String)
问题 At this point it's already an old question and I've probably read every related topic on SO. But to the point. I need some advice or correction maybe? For some reason we have generatable Jsons of 2 types: {"data": {"id": "value"}} and {"data":[{"id": "value"}]} Object and Array. There are also other params but they doesn't matter here. "id" is differ for every request. Sometimes it's userId, portfolioId etc. So I get "id" and pass it to related var. For a long time I was working with the