1

I Have this type to serialize to JSON:

public class JsonReturn<TEntity, TSource>
{
    public ICollection<TEntity> Success { get; set; }
        
    public IDictionary<TEntity, IEnumerable<string>> Errors { get; set; }
}

And It works with Success property, but Errors have failed.

I've read in the Json.Net reference that IDictionaries has its keys serialized using ToString, which results in a NameSpace description...

So, how can I properly serialize the Key and the value of my dictionary?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Jedi31
  • 735
  • 1
  • 6
  • 22

0 Answers0