question

alexmerza avatar image
alexmerza asked

Updating character data with JSON field

I'm trying to update character data with a JSON object, my request goes just fine, but the data is nowhere to be found.

Here's the Request followed by the Response.

LogPlayFab: Request: {
    "CharacterId": "F2B0E2AE82371914",
    "Data":
    {
        "MyTest":
        {
            "Test": "T1",
            "Test 2": "T2"
        }
    },
    "KeysToRemove": null,
    "Permission": "Public",
    "PlayFabId": "F3B4F489F31181D9"
}
LogPlayFab: Response : {"code":200,"status":"OK","data":{"DataVersion":5}}
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
alexmerza avatar image
alexmerza answered

Turns out you can't make a request that contains base json objects, you need to serialize the json object into a json string and store it that way into playfab. After doing that, my data was able to properly be stored.

Not sure if intended, I must have missed that explanation while going through docs.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image brendan commented ·

Correct - the data key/value pair is string/string. I'll file a bug to see about getting an error returned if you try passing in a JSON object.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.