View Single Post
  #2 (permalink)  
Old July 4th, 2007, 09:15 PM
DrToketee DrToketee is offline
Registered User
 
Join Date: Jun 2007
Location: Portland, Oregon, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have not tried this example, so this is just an educated guess from my reading only.

The GetAlbumJSON() method is typed to return an object, but the XmlInclude attribute upon it is forcing the XML serialization to produce the result to follow the XML schema of Album. This may be triggering some compilational need to have a converter to produce the JSON equivalent of Album when a JavaScriptSerializer is doing the serialization. ?

So one thing I would consider trying is to remove the XMLInclude attribute from this method and change its return type from object to Album. Also, make sure you did not have any converters specified in the chapter's web.config (those sections seem to have been all commented out).

Just a stab in the dark. Good luck.

Reply With Quote