Assuming that ‘data’ is the same as ‘jsonPersonList’, JSON doesn’t have a representation that would distinguish a list from an array. To JSON, it’s all arrays.
So what you would need, is a way for the parser to parse an array into a list instead.
Is there a reason why you need the data in a list, rather than an array?
Cannot you use something like:
val listPerson = JSON.parse<Array<Person>>(data).toList()
?