I have this class in a java spring web application.
public class Question{ private String questionText;
I need to convert this to a json object. The problem is that the question text can contain anything. This may be a question about the json object, so the json object itself may be part of the question. I am using google-gson to convert this class to a JSON object.
I should avoid the Text question so that it doesn't cause problems when converting to JSON. If so, how do I do this? If not, then google-gson must somehow avoid the Text question in order to represent it in a json object. In this case, on the client side, how can I convert it back using a java script and display it as a user?
source share