Remark : json 은 view 클릭시 string 형식이 아닌 setPrettyPrinting 으로 보이게 하기
- Going to File | Settings | Build, Execution, Deployment | Debugger | Data Views | Java Type Renderers
- Click + to add new renderer
- Call it JSON renderer
- Supply java.lang.Object for Apply renderer to objects of type
- 다음 로직 넣기
1 2 3 4 5 6 |
if (null == this || this instanceof String) return this; new com.google.gson.GsonBuilder().setPrettyPrinting().create().toJson(this); |