Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Edited Unassigned: Redundant type name serialization in OData JSON light minimal metadata mode [984]

$
0
0
When we write the entries for GET http://localhost:50231/Pets/SampleService.Model.BigPet , in JSON light minimal metadata mode, we emit type names for all BigPets. This is redundant as the type of the URI (BigPet) is the same as the type of entry being serialized. We should only emit type names if the entry being written is a derived type of BigPet.

This is happening as we compare the element type of the entity set (in this case, Pet) with the type of the entry being written (in this case, BigPet) and put the type name if they differ. Ideally, we should be checking the type of the uri and not the entity set.

The offending code is in ODataEntityTypeSerializer.cs , method - ShouldSuppressTypeNameSerialization.






Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>