Update: Simplify serialize and deserialize for data objects (Repository, Product & ProductItem)

This commit is contained in:
machiav3lli
2021-10-14 16:02:17 +02:00
parent 39ebb6fdf6
commit 268d5be601
5 changed files with 74 additions and 33 deletions

View File

@ -74,7 +74,10 @@ class IndexMerger(file: File) : Closeable {
val description = it.getString(0)
val product = Json.factory.createParser(it.getBlob(1)).use {
it.nextToken()
Product.deserialize(repositoryId, description, it)
Product.deserialize(it).apply {
this.repositoryId = repositoryId
this.description = description
}
}
val releases = it.getBlob(2)?.let {
Json.factory.createParser(it).use {