Unable to save Dictionary on ParseUser

2019-09-06 03:35发布

Trying to save a Dictionary as a field on a ParseUser object, but its not working. Its a pretty straightforward:

//updateDict does implement IDictionary<string,T>

    ParseUser.CurrentUser["ItemsStatus"]= updateDict;

    ParseUser.CurrentUser.SaveAsync()

I've already checked to see if my dictionary has values, and I can save the user without issue if I remove the update to the dictionary field. But if I try to add that value I just get a 400 Bad Request "Other Cause" response from parse when I call the save task. Any thoughts?

1条回答
女痞
2楼-- · 2019-09-06 04:20

A dictionary is not a valid Parse data type.

You need to either add the elements of the dictionary to the User object individually or create a new Parse object with the elements from updateDict and create a relation to that.

查看更多
登录 后发表回答