The @JsonAlias() annotation seems to only work for alphabetical keys in the JSON file, but not ones with non-alphabetic keys (i.e. starts with the "@" symbol) - though have not tested if it fails with anything else. It fails in grabbing the correct values for the given key.
Input (deserialization):
{
"@key": "value"
}
Object:
@JsonAlias("@key")
String key;
Expected Output (serialization):
{
"key": "value"
}
Actual Output (serialization):
{
//Nothing because can't deserialize value of "@key" into key attribute
}
Version: Jackson-annotations = 2.9.x;
The @JsonAlias() annotation seems to only work for alphabetical keys in the JSON file, but not ones with non-alphabetic keys (i.e. starts with the "@" symbol) - though have not tested if it fails with anything else. It fails in grabbing the correct values for the given key.
Input (deserialization):
Object:
Expected Output (serialization):
Actual Output (serialization):