Skip to content

Content Manager's "modified" flag should be resilient to JSON field ordering inconsistencies #4838

Description

@allister-beamable

Describe the Bug

One Game Maker reports that after fetching content, the Content Manager tab shows entries as modified even though their field values are identical. When the developer inspected the files on disk and compared them to the content shown in the Beamable Portal, they found that the JSON differed only by field order: that is, the field keys and values were indeed identical, but the order in which the key/value pairs appeared in the JSON object was different.

One contextual wrinkle: the developer uses an in-house tool that publishes content independently from the Beamable Unity SDK.

To Reproduce

Steps to reproduce the behavior:

  1. Go to the Beamable Content Manager tab within Unity
  2. Press "Fetch"
  3. Wait for the download to finish
  4. Observe the badges in Content Manager and log messages in Console

Expected Behavior

  • Zero "modified" badges; content appearing clean and unmodified.

Actual Behavior

  • Persistent "modified" badges even on value-identical content. JSON on disk differs from API-supplied JSON in field order.

Metadata

  • SDK version: Beamable Unity SDK 6.0.1 / CLI 7.2.2
  • Engine version: any Unity
  • Operating System: macOS and Windows

Additional Context

We fixed similar issues in the past by enforcing a sort order on the JSON.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions