By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,807 Members | 1,492 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,807 IT Pros & Developers. It's quick & easy.

JSON decompressing

P: 116

I am retrieving a file from a server, say which is compressed.

What is the method of reading the response in (visual studio)? ie, decompressing it first then reading it?

My general method is as follows but it doesn't like reading the data since it's compressed I guess.

Expand|Select|Wrap|Line Numbers
  1. Dim Url As String = ""
  2. Dim request As WebRequest = Nothing
  3. Dim response As WebResponse = Nothing
  4. Dim strResponseStatus As String = ""
  5. request = WebRequest.Create(New Uri(Url))
  6. request.Method = "GET"
  7. request.ContentType = "application/json-rpc"
  8. response = request.GetResponse()
Oct 11 '14 #1
Share this Question
Share on Google+
4 Replies

Expert 100+
P: 1,208
If its compressed you need to know what kind of compression was used then decompress after you receive it.
Oct 12 '14 #2

P: 116
ok - the decompressing bit I figured but that is the code I'm stuck on. as for the type of compression, that I can't be sure about but let's assume gzip.
Oct 13 '14 #3

Expert 100+
P: 1,208 namespace has a gzipstream
Oct 13 '14 #4

P: 116
Thx Clint - been sidetracked on something at the moment but will try to check back with this shortly
Oct 27 '14 #5

Post your reply

Sign in to post your reply or Sign up for a free account.