There is the dialog that saves an object to the Room database. The dialog should wait for saving to the database in order to run a special Worker class, that will retrieve this object from the database by ID and do some work with it.
But this requires synchronous code that is an anti-pattern in Room. I decided that the best option would be to run WorkManager, which will save the object to the database, and then run a special Worker class through the chain. But the problem is that I can't pass an object to save in Data.Builder, only primitive types. Only serialization variant in JSON remains. Is it possible to do without serialization? After all, the size of the serialized JSON, in theory, can exceed the limit of 10240 bytes.
Any help would be greatly appreciated!