Sorry, I guess I missed that one.

Code:
Public Class SearchSeriesResults
    Public Property data() As SearchSeriesResult()
End Class


Public Class SearchSeriesResult
    Public Property aliases() As String
    Public Property banner As String
    Public Property firstAired As String
    Public Property id As Long
    Public Property network As String
    Public Property overview As String
    Public Property seriesName As String
    Public Property status As String
End Class


Quote Originally Posted by Sitten Spynne View Post
I don't see a 'SearchSeriesResults' type in the code you've posted. I see 'SeriesResults', "SeriesResult", and "SearchSeriesResult". But I'm missing exactly the type I need to see to think about how the parser might be interpreting the data.

At the same time, pay attention to Inferred. VB has some ridiculous, stupid rules about parenthesis because it made the ridiculous, stupid decision to use them for array indices.

If you were using a "hard" language like C#, there would be one rule to remember: "Array of Something is always Something[]". But since VB is an "easy" language, you have to remember:
  • For fields/local variables, there are two valid syntaxes for declaring an array variable. "Public x() As Something", "Public x As Something()".
  • But only one is legal if you want to declare bounds: "Public x(3) As Something".
  • Properties need parenthesis by their names, so their array type indicator needs to be near the type: "Public Property X() As Something()".
  • It's illegal to declare array bounds for a property.

So, since I was typing code by memory, I forgot that the property should be:
Code:
Public Property aliases() As String()
Welcome to VB, where the only rule with no exceptions is "memorize the language reference".

(There's a technical reason, but not a good one. There is a concept in .NET called 'indexers' that maps to something VB6 called "the default property". In C# the rule is "you have to give it a specific name that is invalid in any other context, and it's not legal to call it like a method". In VB the rule is "lol you can call it whatever you want, and even call it directly if you want, so since any property MIGHT be an indexer, EVERY property needs extra syntax. Just in case."

Like I said, in VB if you MIGHT have to type something, you generally HAVE to. Even if it's obvious you don't need it.)