0

hi

i access the Book share API to retrieve data for a book, i search by the isbn, when i do it i get a bunch of text as the request

how can i format the content

thanks
appreciate a reply

2
Contributors
6
Replies
60
Views
4 Years
Discussion Span
Last Post by anisha.silva
0

It could be me that is not familiar with this "Book share API", but a little more information about what you receive in the request and how it is you want to format it may be helpful.

Some code may also be beneficial to understand what you are talking about.

0

ok, so this is a continuation of the post web response display

the code is the same
when i display the response in the 'Result.aspx' i get the text as

{"bookshare": { "version": "4.1.0", "messages": [ ], "book": { "metadata": { "author": [ "William R. Stanek" ], "availableToDownload": 0, "bookshareId": "551313", "briefSynopsis": "From the author and series editor of the immensely popular nd ............etc, "contentId": 551313, "copyright": "2008", "downloadFormat": [ ], "dtbookSize": 5480695, "freelyAvailable": 0, "images": 1, "isbn13": "9780735646087", "language": [ "English US" ], "publishDate": "09152012", "publisher": "Microsoft Press", "quality": "Publisher Quality", "title": "Microsoft® SQL Server® 2008 Administrator's Pocket Consultant" } } }}

the response is in jason
how do i format this

appreciate a reply
thanks

0

HI,

So i deserilized an object from Bookshare: the text has 2 object bookshare and book, so i create 2 classes with the same name

and the code is as below

Session["r"] = response;


        JavaScriptSerializer js = new JavaScriptSerializer();

        bookshare bs = new bookshare();
        bs = js.Deserialize<bookshare>(response);

        Response.Write(bs.version);

i get a text for response but the values does not come to the bs object.

bs.version is null.
what could be the problem.
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.