Iamlooker / Kenko

A workout journal
GNU General Public License v3.0
90 stars 5 forks source link

'time' field missing from 'Set' object in JSON data #7

Closed hyperionhex closed 3 months ago

hyperionhex commented 3 months ago

I've implemented the UI changes to include the time in the SetItem. However, upon running the application and clicking on the "start" button, it terminates the app.

time

FATAL EXCEPTION: main Process: com.looker.kenko.debug, PID: 11829 kotlinx.serialization. MissingFieldException: Field 'time' is required for type with serial name 'com.looker.kenko.data. model. Set' , but it was missing at path: $[0] at kotlinx.serialization. json. internal. StreamingJsonDecoder. decodeSerializableValue( StreamingJsonDecoder. kt: 95) at kotlinx.serialization. encoding. AbstractDecoder. decodeSerializableValue( AbstractDecoder. kt: 43) with tag AndroidRuntime

Iamlooker commented 3 months ago

There is no time field, its either repetitions or duration, which I think is the right way to do it

I mean there can only be one at a time, either reps or duration

Iamlooker commented 3 months ago

I have implemented this

I will add a timer in future