WSDOT-GIS/elc-dotnet-client

Make data contracts easier to serialize with Json.NET

Closed this issue · 0 comments

The data contracts were designed for use with .NET's built-in JSON serialization libraries but do not play nicely with (the more popular and easier-to-use JSON serialization library) Json.NET. 😿

This could be accomplished in a few ways

  • Create a custom Json.NET contract resolver for the ELC data contracts.
  • Redo the data contracts so that they work correctly with Json.NET by default.
    • E.g., The geometry contracts could actually be represented by a single class, removing the class inheritance issues that Json.NET encounters when attempting to serialize the ELC classes.

Update

Microsoft's own API Portability Analyzer even recommends switching to Json.NET in order to support ASP.NET vNext.