thiagoretondar
07/10/2019, 2:23 PMdata class Property(
val name: String,
val value: String
)
data class Element(
val name: String,
val properties: List<Property>?,
val elements: List<Element>? ---> REFERENCE ITSELF
)dalexander
07/10/2019, 2:27 PMMap<String, String> instead of a List<Property> unless Property is a placeholder for something more complex than two strings.Ruckus
07/10/2019, 2:29 PMname can't repeat, or it may just be that order is important and uniqueness is handled manually.dalexander
07/10/2019, 2:29 PMRuckus
07/10/2019, 2:30 PMdalexander
07/10/2019, 2:30 PMRuckus
07/10/2019, 2:40 PMHullaballoonatic
07/10/2019, 5:12 PMRuckus
07/10/2019, 5:14 PMMap.Entry, or am I missing your point?Hullaballoonatic
07/10/2019, 5:16 PMentry.key you have property.name which is more context.Ruckus
07/10/2019, 5:17 PMHullaballoonatic
07/10/2019, 5:19 PMHullaballoonatic
07/10/2019, 5:22 PMval firstNameToNameOfFavoritePet: Map<String, String> = ...