You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I met one issue, i need to request to webserver with JSON API.
request type shows below
{
"data":{
"type":"something"
}
}
I define the POJO.
after i define like below @type("something") @JsonIgnoreProperties(ignoreUnknown = true)
public class Something { @id
public String id;
}
In addition, a resource object MAY contain any of these top-level members:
attributes: an attributes object representing some of the resource’s data.
relationships: a relationships object describing relationships between the resource and other JSON API resources.
links: a links object containing links related to the resource.
meta: a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship.
A resource can be created by sending a POST request to a URL that represents a collection of resources. The request MUST include a single resource object as primary data. The resource object MUST contain at least a type member.
doesn't specify that an attributes must be present.
Hi,
I met one issue, i need to request to webserver with JSON API.
request type shows below
{
"data":{
"type":"something"
}
}
I define the POJO.
after i define like below
@type("something")
@JsonIgnoreProperties(ignoreUnknown = true)
public class Something {
@id
public String id;
}
the serialized string shows below:
{
"data": {
"type": "something",
"attributes": {}
}
}
how to disable the "attributes": {} ?
Wait your kindly reply. ^^
The text was updated successfully, but these errors were encountered: