Post by altair on Jun 5, 2015 0:53:35 GMT 10
Hi Folks,
I have a string 'latestver' and I want to set a value, which is present as a JSON in a Url. How can I accomplish this.
Altair - The Flying One
|
|
Post by altair on Jun 6, 2015 8:08:10 GMT 10
Anyone Altair - The Flying One
|
|
Post by Nathan Lecompte on Jun 6, 2015 12:13:16 GMT 10
So, I'm guessing what you mean is: In your project you have a string called "latestver", you want to change the value of this string by getting a value from a URL which sends back it's response in JSON? (correct me if I'm wrong)
Do you want to get the response by only using VB.NET or a 3rd party tool?
|
|
Post by altair on Jun 7, 2015 1:48:11 GMT 10
I will describe it more.
What I have is a html webpage which has to fetch a JSON file. I want to know how I can read the online JSON file as string. So I can use parseJSON(String).
Altaïr - The flying one
|
|
Post by Nathan Lecompte on Jun 9, 2015 14:45:52 GMT 10
I think that depends on what the response of the JSON file is (you can sometimes filter the response, I think), do you by any chance have an example of the JSON file?
|
|
Post by Imformas on Jun 9, 2015 21:14:34 GMT 10
you could do it in java script using $.ajax({itemsNames});
Programming language'sCSharpC++CObjective-CVBProject'sSharpMediaSharpEditYoutifygithub.com/Stephen-Fox-0
|
|
Post by altair on Jun 10, 2015 22:38:28 GMT 10
you could do it in java script using $.ajax({itemsNames}); Yes I am currently using the Ajax thingy. I got it from chris's code in Weather for AirBrowse. What I want to know is how to use read a JSON array using AJAX. Altaïr - The flying one
|
|
Post by Imformas on Jun 10, 2015 23:45:34 GMT 10
You could try $.ajax({ type: "GET", url: "The url where the json file is.", dataType: "jsonp", success: function(response) { //what to do after it gets your json } failed: function(response) { //When it failed to get your json } });
Programming language'sCSharpC++CObjective-CVBProject'sSharpMediaSharpEditYoutifygithub.com/Stephen-Fox-0
|
|
Post by altair on Jun 11, 2015 23:59:40 GMT 10
Yes Imformas,
I am using that already. I want to know how to parse an array.
Altaïr - The flying one
|
|
Post by Imformas on Jun 12, 2015 5:47:26 GMT 10
Yes Imformas, I am using that already. I want to know how to parse an array. Altaïr - The flying one $.ajax({
type: "GET",
url: "The url where the json file is.",
dataType: "jsonp",
success: function(response) {
$.each(responce.arrayname, function(index, item) { //There }); }
failed: function(response) {
//When it failed to get your json
}
});
Programming language'sCSharpC++CObjective-CVBProject'sSharpMediaSharpEditYoutifygithub.com/Stephen-Fox-0
|
|