i have vespa verion 5.220.14 installed in one server where i have used json (provided by gson lib ) in searcher, while i am deploying the same code in vespa version 5.550 in a diffrentserver it is not working and changing it to string.
Attached are the screenshot for same.
What could be the possible reason for same,
And what should be resolution to make this work. 
CodePudding user response:
special-handling of org.json in rendering was removed one year ago:
you should probably wrap your "data" field in a facade that implements the com.yahoo.data.JsonProducer interface:
https://javadoc.io/doc/com.yahoo.vespa/container-search/latest/com/yahoo/data/JsonProducer.html
CodePudding user response:
Arne is correct, we had to move this due to the license of org.json, sorry for the inconvenience.
To implement Arne's solution, all you need is to replace hit.setField("data", newroot); in your code by
hit.setField("data", (com.yahoo.data.JsonProducer)s -> s.append(resdata));

