use case:
@JsonApiTypeForClass(value = "data")
DataEntity {
private Long id;
private String type; // int, long, bool
}
if entity has a property named "type",JsonApiData remove it from "attributes", output result:
{ "data": { "id": "123", "type": "data", "attributes": { // "type":"int" should be here } } }
JsonApiData#164
Map<String, Object> attributeMap = objectMapper.convertValue(content, Map.class); attributeMap.remove("links"); attributeMap.remove(idField.name); attributeMap.remove(typeField.name);
use case: @JsonApiTypeForClass(value = "data") DataEntity { private Long id; private String type; // int, long, bool }
if entity has a property named "type",JsonApiData remove it from "attributes", output result:
{ "data": { "id": "123", "type": "data", "attributes": { // "type":"int" should be here } } }
JsonApiData#164Map<String, Object> attributeMap = objectMapper.convertValue(content, Map.class); attributeMap.remove("links"); attributeMap.remove(idField.name); attributeMap.remove(typeField.name);