Microsoft has released a release candidate (prerelease) version of WCF Data Services 5.4.0 with client deserialization and serialization hooks, instance annotations on atom payloads, client consumption of instance annotations in addition to simplified transition between Atom and JSON formats.
The client deserialization and serialization hooks provide extensibility points that enable a number of different scenarios such as modifying wire types and property names. The new release also provides support for instance annotations on Atom payloads, which is an extensibility feature in OData feeds that allow OData requests and responses to be marked up with annotations that target feeds, single entities and properties.
WCF Data Services 5.4.0 has added APIs to the client to enable instance annotations to consume them, that provides an ability to indicate which instance annotations the client cares about via the Prefer header thus streamlining the responses from OData services that honor the odata.include-annotations preference. It also includes a new feature which
simplifies the transition between the Atom and JSON format.
WCF Data Services 5.4.0 includes several bug fixes which provide solution for the issues under the following scenarios
- Reading a collection of complex values would fail if the new JSON format was used and a type resolver was not provided
- ODataLib was not escaping literal values in IDs and edit links
- Requesting the service document with application/json;odata=nometadata would fail
- Using the new JSON format without a type resolver would create issues with derived types
- LINQ provider on the client would produce $filter instead of a key expression for derived types with composite keys
- Some headers required a case-sensitive match on the WCF DS client
- A request for the new JSON format could result in an error that used the Atom format
- PATCH requests for OData v1/v2 payloads would return a 500 error rather than 405
The latest build also make it easier to track the current item in ODataLib and fixes an issue where the inability to set EntityState and ETag values forced people to detach and attach entities for some operations. The prerelease version also targets .NET Framework 4.0, Silverlight 4.0 and has been localized for several languages.