Question

4
Replies
490
Views
VipinK17 Member since 2013 15 posts
Accenture Services Pvt Ltd.
Posted: 3 years ago
Last activity: 2 years 9 months ago
Closed

Parsing JSON response containing single text. Getting JsonMappingException

Created a Connect-REST service with PUT request method as per the service requirement. When successful i.e. pyHTTPResponseCode=200 the service responds with following JSON response in DataSource page

pyRawMessage = "Equipment MT1421TPK481 successfully removed"

The out of box connector rule throws an JsonMappingException

Can not instantiate value of type [map type; class java.util.LinkedHashMap, [simple type, class java.lang.Object] -> [simple type, class java.lang.Object]]
from String value ('Equipment ERT1231 successfully removed'); no single-String constructor/factory method

I tried changing the property type of the property mentioned in the Response to PageList, Page, String, Java Object, Java object List.... but all threw different type of exception. Please can you throw some light - if there is any limitation with Rest JSON etc..

Is there any solution you could suggest? thanks very much for your help.

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Data Integration
Moderation Team has archived post
Share this page LinkedIn