Object to Json format

about json to string.

Object obj = issue.getCustomFieldValue(customField);

The customField above returns an object

use GSON to convert ‘object to string’.

ERROR:

<stack-trace>java.lang.StackOverflowError
...

How to handle this object for Response.ok(???).build?