skip to Main Content

Json – Deserialization using jackson mapper annotations in java

I am trying to deserialize the following json using Jackson annotations. Here is my current code: @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "serviceType") @JsonSubTypes({ @JsonSubTypes.Type(value = StripeServiceConfiguration.class, name = "Stripe"), @JsonSubTypes.Type(value = BrainServiceConfiguration.class, name = "Brain"), })…

VIEW QUESTION

Getting error: Newtonsoft.Json.JsonSerializationException: 'Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'myclass'

I am trying to deserialize a javascript kind of JSON "{n "resultSet1": [n {n "AgentID": 13173,n "FirstName": "Drilon",n "SG_ID": 14336,n "LoginName": "UI813926",n "SG_Description": "LKC Bauhotline",n "SG_Name": "Y_BAU__FO",n "EnterpriseName": "LKC_Abdullahu_Drilon",n "LastName": "Abdullahu"n },n {n "AgentID": 14432,n "FirstName": "Pinar",n "SG_ID": 14336,n "LoginName":…

VIEW QUESTION
Back To Top
Search