-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Probably I somehow incorrectly configure the application, but when I get it I get an error #115
Comments
The correct approach to write deserializing code manually is to use override fun load(input: KInput): ChildModel {
val newInput = input.readBegin(serialClassDesc)
val i = newInput.readElement(serialClassDesc)
check(i == 0) // if you have more than one field, make "when" here
val cf = newInput.readStringElementValue(serialClassDesc, 0)
newInput.readEnd(serialClassDesc)
return ChildModel(cf = cf)
} |
But I'm wondering why you're trying to write the same code that plugin will generate for you... |
It might not be the case for @BorzdeG, but I got a similar error. In my case, I was trying to parse my object from an empty e.g: If class FooUserModel(name: String) Is updated to class FooUserModel(firstName: String, lastName: String) And the model you have stored/trying to parse doesn't match 1-to-1, this is the logical error to be thrown, so watch out for that. |
Also, fixes and issue where the String was default to which made the serialization fail: - Kotlin/kotlinx.serialization#115 #17, #69
) * Scaffold sharedpreferences module - Attach to store implemetnation - Mock data currently being returned Some housekeeping. * Small configurations for CI Still not working, wanted to make mock work with debug but variants still compain. * Test removing ViewModelModule * Ci why you no work? * Fix lints on CI * Working stuff for CI * housekeeping mobile-ui/build.gradle Had to make some changtes while debuging CI fails. This change still makes sense IMO. #69 * Rename data package to include project name #69 * Remove unecessary .gitignore from other packages Maintenece commit, not really related to this branch feature. * Manifest cleanup and format * Scaffold stuff for stream episode 17 Some basic ideas just so I know what I'm supposed to continue, a lot of TODOs so lint warns me. For #17 Ref #69 * Housekeeping from previous commit * Fix typo in readme Changed the copy on the stream log section * Include kotlinx.serialization experimental library for sharedPrefs This will be included in the stblib from Kotlin 1.3. #17, #69 * Make SharedPrefTransport model @kotlinx.serialization.Serializable Also, fixes and issue where the String was default to which made the serialization fail: - Kotlin/kotlinx.serialization#115 #17, #69 * SharedPrefMapper tests - Created necessary factory/mock data classes for the SharedPref module Named the mock classes with the SharedPref prefix for #66 #17 #69 * Initial tests for FrameworkLocalStorageImpl Lacking SharedPreferences test setup - Will probably need to move all the Android test libs to androidx variant. #17 #69 * Include stream episode PR to README
* Scaffold sharedpreferences module - Attach to store implemetnation - Mock data currently being returned Some housekeeping. * Small configurations for CI Still not working, wanted to make mock work with debug but variants still compain. * Test removing ViewModelModule * Ci why you no work? * Fix lints on CI * Working stuff for CI * housekeeping mobile-ui/build.gradle Had to make some changtes while debuging CI fails. This change still makes sense IMO. #69 * Rename data package to include project name #69 * Remove unecessary .gitignore from other packages Maintenece commit, not really related to this branch feature. * Manifest cleanup and format * Scaffold stuff for stream episode 17 Some basic ideas just so I know what I'm supposed to continue, a lot of TODOs so lint warns me. For #17 Ref #69 * Housekeeping from previous commit * Fix typo in readme Changed the copy on the stream log section * Include kotlinx.serialization experimental library for sharedPrefs This will be included in the stblib from Kotlin 1.3. #17, #69 * Make SharedPrefTransport model @kotlinx.serialization.Serializable Also, fixes and issue where the String was default to which made the serialization fail: - Kotlin/kotlinx.serialization#115 #17, #69 * Implement initial SharedPref slot save logic #17, #69 * Add stream ep to README, ignore failing test on shared pref #17, #69
* Scaffold sharedpreferences module - Attach to store implemetnation - Mock data currently being returned Some housekeeping. * Small configurations for CI Still not working, wanted to make mock work with debug but variants still compain. * Test removing ViewModelModule * Ci why you no work? * Fix lints on CI * Working stuff for CI * housekeeping mobile-ui/build.gradle Had to make some changtes while debuging CI fails. This change still makes sense IMO. #69 * Rename data package to include project name #69 * Remove unecessary .gitignore from other packages Maintenece commit, not really related to this branch feature. * Manifest cleanup and format * Scaffold stuff for stream episode 17 Some basic ideas just so I know what I'm supposed to continue, a lot of TODOs so lint warns me. For #17 Ref #69 * Housekeeping from previous commit * Fix typo in readme Changed the copy on the stream log section * Include kotlinx.serialization experimental library for sharedPrefs This will be included in the stblib from Kotlin 1.3. #17, #69 * Make SharedPrefTransport model @kotlinx.serialization.Serializable Also, fixes and issue where the String was default to which made the serialization fail: - Kotlin/kotlinx.serialization#115 #17, #69 * Test for SharedPreferences all slots free, saves to Slot.ONE #17, #69 * Final touches on frameworkLocalStorageTest Still missing clear all, getAll and make sure observeSharedPreferencesChanges emitts for any changes (missing tests basically). #17, #69 * Add episode to README #84 * Stream Episode 19 (#84) * Final touches on frameworkLocalStorageTest Still missing clear all, getAll and make sure observeSharedPreferencesChanges emitts for any changes (missing tests basically). #17, #69 * Add episode to README #84 * Add klint link * Create stub test class on :presentation This is a reminder for eventual instrumentation tests, stll not sure if makes sense to use though.
source: https://github.com/BorzdeG/samples-kotlin-subprojects/tree/kotlinx.serialization
The text was updated successfully, but these errors were encountered: