0
我有從reflectionToString
方法(http://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/builder/ToStringBuilder.html#reflectionToString%28java.lang.Object%29)獲得的對象的字符串表示形式,我需要將它放入GWT Label
。但是這個字符串可能很長,我想以一種很好的格式顯示它,理想情況下是json格式。GWT標籤格式對象字符串
任何人有任何建議如何格式化?
Eclipse可以輕鬆生成toString方法:Source> Generate toString。然後替換所有的逗號和=來重新格式化json中的字符串 – JFB