given a JSON-annotated Java class, I am looking for some utility to get its type information.
For example having below class structure:
class A extends B {
@JsonIgnore
int _some_internal_field;
int f1;
C f2;
}
class B {
boolean f3;
String f4;
}
class C {
float f5;
}
I would like to call
System.out.println(
jsonTypeInfoFrom(A.class)
.toString());
and get:
{
"f1": "int",
"f2": {
"f5": "float"
},
"f3": "boolean",
"f4": "string"
}
Where I can find such a jsonTypeInfoFrom(Class)
method? Looked into Jackson itself, but could not find one (yet).
Please help :)
Adrian.