There was an error parsing JSON data
Unexpected token B in JSON at position 0
The JAX-RS resources are configured to use JacksonJsonProvider for writing the JSON message body. JacksonJsonProvider.isWriteable() is indicating that it cannot write the value because _untouchables includes String.class. It appears String.class was put back into the _untouchables list as a result of this [link bug|https://github.com/FasterXML/jackson-jaxrs-json-provider/issues/12]
That bug, however, appears to have been targeted at dealing with an XML issue, not a JSON issue.
It should have been ideally taken care by the Jackson providers. However, it's not and hence proposing this fix.
* Create our own custom NutchJsonProvider based on JacksonJsonProvider and remove the String.class from the _untouchables
* Register this NutchJsonProvider with NutchServer to be used while writing JSON message body
I have attached the patch along with this issue
The other option is to JsonEscape the string and pad it with double quotes before returning. This has to be done at all places wherever string is returned as Json response and also is prone to errors in future if anybody misses this escaping and padding.
This message was sent by Atlassian JIRA