locked
Custom Formatter RRS feed

  • Question

  • Is there any way to define a custom format for the return of an entity?  I'm dying here...  I'd love to use this, but I need to return data as binary (application/octet-stream) gzipped CSV and other formats...  I know this seems strange, but performance and interop rule the world here...

    Ideas?
    Friday, August 22, 2008 1:11 PM

Answers

  • There is no good way to doing this in V1. This is something we are looking to do in V2. We are still in early development phase for V2, but this is high in our priority list, so hopefully we should do this in V2.

     

    The thinking is to expose/consume the Syndication object model for serialization/deserialization. Hence, anyone can take the syndication model and write their own serialization/deserialization.

     

    Thanks

    Pratik

    Friday, August 22, 2008 5:58 PM
    Moderator

All replies

  • There is no good way to doing this in V1. This is something we are looking to do in V2. We are still in early development phase for V2, but this is high in our priority list, so hopefully we should do this in V2.

     

    The thinking is to expose/consume the Syndication object model for serialization/deserialization. Hence, anyone can take the syndication model and write their own serialization/deserialization.

     

    Thanks

    Pratik

    Friday, August 22, 2008 5:58 PM
    Moderator
  • Can you advise on any "hack" to get around it in the short term - and then patch it up come V2?  I've tinkered with returning byte[], but then I lose support for all the yummy filter/top/orderby goodies.

    Decompilation of the framework shows hardcoded Json/Atom/Pox enumerables at the switch statement - no good entry points.

    Also, byte[] isn't as good as having stream support (like in standard WebGet methods) - as some of the data I'm dealing with is in the hundreds of MB.

    Just my rant!  Thanks!
    Monday, August 25, 2008 2:27 PM