I'm having some trouble making sense of class inheritance and serialization I have this data structu...
z
I'm having some trouble making sense of class inheritance and serialization I have this data structure, which can vary deeper down in the json object The easy way which I've gone is just creating the same data class for each one but then I end up with having the same structure multiple times The ideal way I believe for this case would be to use generics and then that way it could simplify my code a lot (I assume) heres two examples of the data i'm working with
Copy code
{
  "contents": {
    "singleColumnBrowseResultsRenderer": {
      "tabs": [
        {
          "tabRenderer": {
            "content": {
              "sectionListRenderer": {
                "contents": [
                  {
                    "playlistVideoListRenderer": { ... }
                  }
                ]
              }
            }
          }
        }
      ]
    }
  }
}
Copy code
{
  "contents": {
    "singleColumnBrowseResultsRenderer": {
      "tabs": [
        {
          "tabRenderer": {
            "content": {
              "sectionListRenderer": {
                "contents": [
                  {
                    "itemSectionRenderer": { ... }
                  }
                ]
              }
            }
          }
        }
      ]
    }
  }
}