I am trying to get the object's properties as a list. So for example:
class Sample {
private String type;
private String name;
private int value;
// getter-setter
}
Expected output:
{"type", "name", "value"}
Is there a programmatical way to do this?