I'm using RestKit for posting objects to the server. In my object I have two properties: name
and socialId
.
I want to send to server only properties that have data.
If name != nil
send:
{
"name" : "name",
}
If socialId != 0
send:
{
"socialId" : socialId,
}
But RestKit sends all data. For example:
{
"name" : "",
"socialId" : 0,
}
How can I change this behavior?