I’m trying to create a private project that assigns the members from a Trello card to that project, using a single Add New Project request. I’m using Zapier to connect Trello and Clockify. Everything is working except the membership assignments. I keep getting this error:
JSON parse error: Cannot deserialize value of type
java.util.ArrayList<com.clockify.adapter.http.project.MembershipRequest>
from String value (tokenJsonToken.VALUE_STRING
) (HTTP Status Code: 400)
I’m looping through a list to collect the properties, and push the objects to a list, then inserting that list of objects into an array as the value the “memberships” property. My objects looks like this:
{
“userId”:“xxxxxxxxx”,
“hourlyRate”:“undefined”,
“costRate”:“undefined”,
“targetId”:“undefined”,
“membershipType”:“PROJECT”,
“membershipStatus”:“ACTIVE”
}
I’m a total novice, so I’m hoping I’m just missing some basic syntax here that’s making these objects unreadable to the API. Is it acceptable to have these properties undefined? Is that the correct way to notate undefined in JSON? How could I have the target ID (of the project) when the project isn’t yet made? I would be grateful for some suggested resources in lieu of a definite answer.