Equality Checks in Kotlin With Unstructured Data
This is a small blog post on equality checks in Kotlin when one of the objects may contain arbitrary data. Let’s say you have an object that looks like: data class ArbitraryData(val id: UUID, val someData: Map<String, Any>) where someData is any json map of data that could contain any untyped data at runtime. Now, if you have two instances of this object with the same data and try to compare the two using the regular equals method, you would get a false result....