'vespa json object changes to string
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. 
Solution 1:[1]
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
Solution 2:[2]
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));
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Arne |
| Solution 2 | Jon |

