skip to Main Content

Json – parse generic sealed class in kotlin using jackson

I have the following generic sealed class representing the status of network response. @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "status") @JsonSubTypes( value = [ JsonSubTypes.Type(value = Response.OK::class, name = "OK"), JsonSubTypes.Type(value = Response.Error::class, name = "ERROR"), ] )…

VIEW QUESTION

Unmarshal a dynamic json

I have a bunch of JSON files that I need to Unmarshal. They have basically the same format, but different "length" one example https://pastebin.com/htt6k658 another example https://pastebin.com/NR1Z08f4 I have tried several methods, like building structs like type TagType struct {…

VIEW QUESTION
Back To Top
Search