Skip to content

Can't serialize/deserialize GameplayTag and GameplayTagContainer with Newtonsoft Json #16

Description

@rurumi0318

GameplayTag and GameplayTagContainer can't be serialized to JObject with Newtonsoft Json, one of the built-in package.

[System.Serializable]
public class MyClass
{
    public GameplayTag tag;
    public GameplayTagContainer tagContainer;
}

JObject.FromObject(myClassInstance);

The error message

JsonSerializationException: Self referencing loop detected for property 'ParentTag' with type 'BandoWare.GameplayTags.GameplayTag'. Path 'tag.ParentTag.ParentTag'.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions