Skip to content

LitJson GUID type support #202

@MadSciencist

Description

@MadSciencist

Hi.

Looks like the LitJson used for serialization does not properly handle GUID types.

Minimum code to reproduce it:

        public class AnythingWithGuid
        {
            public Guid Id { get; set; }
        }

        [TestMethod]
        public void SerializeObjectContainingGuid_ThrowsError()
        {
            var obj = new AnythingWithGuid();
            JsonMapper.ToJson(obj);
            Assert.IsNotNull(obj);
        }

The error: ThirdParty.LitJson.JsonException: Max allowed object depth reached while trying to export from type System.Guid.

Is there any workaround for it? Is such behavior documented?
Might be related: #109

Thanks,
Mateusz

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