3 comments

You can use XStream for that, something like:

public String toJSON(Object o) {
    JsonHierarchicalStreamDriver driver = new JsonHierarchicalStreamDriver();
    XStream xs = new XStream(driver);
    return xs.toXML(o);
}

0

Yes, XStream is bundled with TeamCity.

0

Please sign in to leave a comment.