![]() val settings by (initial = AppSettings()) // Works fine the first timeĪ second composition is initiated, where settings - A non nullable variable is set to null, and the app crashed with an NPE. so you just to do is adaptee the JSON property to a Date object, and format a Date object to the JSON property if you want to send a Date object to the server which only accept a LocalDateTime object. The initial composition goes fine, data is received from ViewModel/LiveData/Room. a LocalDateTime object has been serialized to a string long JSON property through an HTTP REST API. In a Jetpack Compose component I'm subscribing to Room LiveData object using observeAsState.
0 Comments
Leave a Reply. |