K
K
kmx2014-05-26 08:54:02
Windows
kmx, 2014-05-26 08:54:02

How to load JS from server in Split template for windows store apps?

How easy is it in the Split template (the default template when creating a new project in VS 2013) for Windows Store Apps to make it load the SampleData.json file from the server?
Those. so that when the application starts, the file is taken from my server, and not from local storage.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyacheslav Zolotov, 2014-05-26
@kmx

var client = new HttpClient();
var result = await client.GetStringAsync(/**ваш урл/);

//then you can deserialize, for example, using json.net (it will be smarter and smarter than standard serializers)
var resultObject = JsonConvert.Deserialize(result);
Something like this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question