AlexTheMighty
AlexTheMighty

Reputation: 91

Unable to save Dictionary on ParseUser

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?

Upvotes: 0

Views: 462

Answers (1)

Rog
Rog

Reputation: 17170

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.

Upvotes: -2

Related Questions