I have a problem working on a collection when deserializing json into a Treemap collection. It, has this error:
class java.util.LinkedHashMap cannot be cast to class data.Worker (java.util.LinkedHashMap is in module java.base of loader 'bootstrap'; data.Worker is in unnamed module of loader 'app')
I have tried to change timezone, but i think, that main problem was a deleting a worker string after saving my Treemap into json.
before parse
{1=Worker{id=56, name='zeleboba', coordinates=Coordinates{x=14, y=88.0}, creationDate=2024-03-23T15:53:35.294467, salary=2.1421412E7, endDate=null, position=CLEANER, status=FIRED, organization='foobar'}}
it after
{1={id=56, name=zeleboba, coordinates={x=14, y=88.0}, creationDate=2024-03-23T15:53:35.294467, salary=2.1421412E7, endDate=null, position=CLEANER, status=FIRED, organization=foobar}}