JsonMappingException: Can not instantiate value of type

Suppose that you have this exception:

org.codehaus.jackson.map.JsonMappingException: Can not instantiate value of type [simple type, class ru.sberbank.bigdata.nrt.gateway.core.services.runtime.PartitionInfo] from JSON String; no single-String constructor/factory method

Most often this happens due to syntax errors in the original JSON. Firstly, check that your source JSON is NOT empty string! Then check your syntax, for example, that you do not have extra space:

{
    "key1": "val1" ,
    "key2": "val2"
}

Or extra commas:

{
    "key1": "val1",
    "key2": "val2",
}
Telegram channel

If you still have any questions, feel free to ask me in the comments under this article or write me at promark33@gmail.com.

If I saved your day, you can support me 🤝

Leave a Reply

Your email address will not be published. Required fields are marked *