Using Jackson deserialization it would be great to have an option
to deserialize JSON array of items (of any nature: object, number, string) to a Java array of String.
I see that @JsonRawValue allows to have similar functionality for nested fields.
Is it possible to implement the same for "top level" objects?
void test(){
var payload = """ [
{"a": 1, "b": "hello"},
{"a": 2, "b": "bye"},
"something"
]
""";
// What else is required to get the effect of @JsonRawValue ?
String[] rawItems = new ObjectMapper().readValue(payload, String[].class);
assertEquals("""{"a": 1, "b": "hello"}""", rawItems[0]);
assertEquals("""{"a": 2, "b": "bye"}""", rawItems[1]);
assertEquals("\"something\"", rawItems[2]);
}