List<object> mapping in v5.5

Hello!

I have a POCO like this:

[DataContract]
public class BrowseProtocolTemplateResponseLight
{
    [DataMember(Name = "ProtocolTemplateId")]
    public Guid Oid { get; set; }

    [DataMember]
    public string Name { get; set; }

    [DataMember]
    public string Title { get; set; }

    [DataMember]
    public string Description { get; set; }
    
    [DataMember]
    public List<object> ProtocolBusinessObjects { get; set; }

    [DataMember]
    public ResponseStatus ResponseStatus { get; set; }
}

Before the v.5.5 the ServiceStack.Text.TypeSerializer.DeserializeFromString<BrowseProtocolTemplateResponseLight>(json) function fill the ProtocolBusinessObjects property with a List<string>. Now this property is null.
This json is stored in a table and if I read with OrmLite and map to BrowseProtocolTemplateResponseLight also got null value (e.g. Db.Single<BrowseProtocolTemplateResponseLight>(query)).

I try to use the new AutoMapping.RegisterConverter without success.

Thank you,
Tom

Can you please provide the full source code I can run locally to repro the issue, e.g. like an example on https://gistlyn.com

I have created two sample projects. One for SS 5.4 and one for 5.5.

Thank you!

Thanks for the repro, this issue should be resolved from this commit available from v5.5.1 that’s now available on MyGet.

Thank you for your quick fix!

Is it safe to use your MyGet packages in a production environment or do you recommend to me to stay at the v5.4?

Yeah the MyGet pre-release packages run through the same CI used to create the NuGet packages, they’re just a snapshot in time.

The only issue with them is they’re published under the same version number e.g. v5.5.1 so if you restore different packages at different points in time you could be installing dirty packages that can throw an NoSuchMethodException, to resolve you just need to clear out your NuGet packages cache to force a clean install of the latest packages:

$ nuget locals all -clear