You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the POJOs were POGOs we could use the Groovy @toString annotation, but I think we want to keep the core functionality in straight Java.
I've heard good things about Project Lombok that has similar features (including a @toString annotation) for straight Java, but at the expense of additional compile-time and IDE tooling. I'm leaning against using it for this project, but would like to try it out on another project sometime. (There's also a prototype implementation of using Groovy annotations to make POJOs, see GROOVY-7492.)
I think there are two approaches worth considering:
Write toString() methods by hand.
Use the Jackson ObjectMapper to convert to JSON String:
Let me quickly describe what issue I faced yesterday:
I wanted to dump some intermediate results, in particular of
listUnspent
, which returns aList
ofUnspentOutputs
.The change was basically:
However, the result:
It would be nice, if the
UnspentOutput
(and others) would be converted to something readable, such as:The Groovy
@ToString()
class annotation may be useful?The text was updated successfully, but these errors were encountered: