473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

JSON decompressing

116 64KB
Hi

I am retrieving a file from a server, say http://www.abc.com/abc.json which is compressed.

What is the method of reading the response in vb.net (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 = "https://www.abc.com/abc.json"
  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()
  9.  
Thanks!
Oct 11 '14 #1
4 1765
iam_clint
1,208 Expert 1GB
If its compressed you need to know what kind of compression was used then decompress after you receive it.
Oct 12 '14 #2
robertybob
116 64KB
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
iam_clint
1,208 Expert 1GB
http://msdn.microsoft.com/en-us/libr...vs.110%29.aspx
system.io.compression namespace has a gzipstream
Oct 13 '14 #4
robertybob
116 64KB
Thx Clint - been sidetracked on something at the moment but will try to check back with this shortly
Oct 27 '14 #5

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

Similar topics

16
by: G Matthew J | last post by:
http://htmatters.net/htm/1/2005/07/evaling-JSON.cfm This is more or less in response to Mr Crockford's admonition a few months ago, "fork if you must". Ironically, although in that usenet post...
20
by: Luke Matuszewski | last post by:
Welcome As suggested i looked into JSON project and was amazed but... What about cyclical data structures - anybody was faced it in some project ? Is there any satisactional recomendation... ...
2
by: Kevin Newman | last post by:
Hello, I noticed that the JavaScript library for JSON posted on json.org (http://www.json.org/json.js) is modifying Object.prototype (adding a method - toJSONString). I thought this was...
0
by: jimmyfingers | last post by:
I've just tried the following code for decompressing a .zip file, but get the following error message: "The magic number in GZip header is not correct. Make sure you are passing in a GZip stream."...
3
by: Adam | last post by:
I'm trying to retrieve some values from a json object, but instead it's giving me the property name. For example: var json = { "glossary": { "title": "example glossary" } }; console.log(json);...
2
by: ChrisO | last post by:
I've been pretty infatuated with JSON for some time now since "discovering" it a while back. (It's been there all along in JavaScript, but it was just never "noticed" or used by most until...
23
by: dhtmlkitchen | last post by:
JSON We all know what it is. In ECMAScript 4, there's a JSON proposal: Object.prototype.toJSONString String.prototype.parseJSON The current proposal, String.prototype.parseJSON, returns...
9
by: Jon Paal [MSMD] | last post by:
using json like ( {"Records": , "RecordCount":"1" } ) and jquery like: $.ajax({ .... success: function(json, status) {
2
pradeepjain
by: pradeepjain | last post by:
i have a page post2.php which prints the json array like { page: 1, total: 239, rows: }, {id:'238',cell:}, {id:'237',cell:}, {id:'236',cell:}, {id:'235',cell:},
2
by: robertybob | last post by:
Hi I am retrieving a JSON response for a menu (via NewtonSoft) and am successfully parsing it for use. The problem is that the end data I need could be 3 levels down or could be 7 levels down....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.