Unable to parse generics on 1.3.0
See original GitHub issueKtor Version and Engine Used (client or server and name) Ktor Version: 1.3.0
Describe the bug My generic classes can’t be parsed on 1.3.0
To Reproduce
I have this Response
class
@Serializable
class Response<T> {
val status: Int,
val message: String,
val data: T
}
for this response:
{
status: 200,
message: "Success",
data: { ... }
}
It errors with a message that the only generic classes for now are standard collections.
This works on 1.2.6
Expected behavior
It should be able to parse the generic Response
class
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
java generic String to <T> parser - Stack Overflow
//Attempt to instantiate an object of type T from the given input string //Return a default value if parsing fails static <T> T...
Read more >Unable to Parse Result Set 'AFEnvironmentConfiguration ...
Content server says "RUNNING" but user can only login to UCM admin server, and cannot view logs. In addition, the Managed Attachments screen ......
Read more >Java Programming Tutorial on Generics
Introduction. JDK 5 introduces generics, which supports abstraction over types (or parameterized types) on classes and methods. The class or method designers ...
Read more >Constantly getting this error while training Deep and Wide ...
Failed to load entrypoint azureml.PipelineRun = azureml.pipeline.core.run:PipelineRun._from_dto with exception (azure-mgmt-core 1.3.0 ...
Read more >CocoaPods Fails On Apple Silicon | Apple Developer Forums
uninstalling the cocoapods package through gem (sudo gem uninstall cocoapods) and reinstalling it with homebrew (brew install cocoapods) fixed my problem.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @kuuuurt, thanks for the report. As I see this is the current limitation of kotlinx.serialization. It’ll be fixed in the next serialization release.
Nope. Fixed in
1.3.2