question

Ann Wright avatar image
Ann Wright asked

Unreal Write Events PayloadJSON bug

In all Unreal SDKs, there's a bug in the Events API.

"PlayFab::EventsModels::FEventContents::writeJSON" uses the wrong method (WriteValue) to write out the PayloadJSON if it's set. It should be using the "WriteRawJSONValue" method on the jsonWriter. If using JSON events (that is, pre-creating a JSON object as a string to put in the PayloadJSON field), the request to write an event always fails with a 400, stating that the "PayloadJSON is not valid JSON"

An example in the 4.27 plugin:

https://github.com/PlayFab/UnrealMarketplacePlugin/blob/1.80.220406/4.27/PlayFabPlugin/PlayFab/Source/PlayFabCpp/Private/Core/PlayFabEventsDataModels.cpp#L131

sdksunreal
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

·
Ann Wright avatar image
Ann Wright answered

This appears to just be some unclear API docs. Apparently it IS supposed to be a string, please ignore the above post.

10 |1200

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

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.