We use JSON serialization with Jackson to expose internal state of the system for debugging properties.
By default jackson does not serialize transient fields - but
You can create a custom getter for that transient field and use @XmlElement attribute. It doesn´t matter the name of that getter.
For example:
public class Person { @XmlTransient private String lastname; @XmlElement(name="lastname") public String getAnyNameOfMethod(){ return lastname; } }