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

appreciate a reply

Recommended Answers

All 6 Replies

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.

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

still working on this
thanks will let you know the progress


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);


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.

does someone know why am i getting null values

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.