Answer the question
In order to leave comments, you need to log in
What to choose xml vs json in C# for widows phone 8
The question arose of choosing the format for transferring data from the server to the application.
Briefly. At startup, the application makes a request to the server from where it receives data (UTF-8) and saves it to a file in isolated storage. Currently using Json. The response contains about 55 news items (including image addresses and detailed news text) and 10 persons. Further, for all pages, the data is taken from a file in isolated storage.
Now json is used, but there is a wild performance problem (data parsing from the json file occurs on each page): when navigating between pages, there is a strong delay of 2-5 seconds.
Would changing to xml help solve this problem?
Answer the question
In order to leave comments, you need to log in
If the data is received only at startup, why save it to a file, and not store the parsed version in memory?
No, it won't. You are doing something wrong, try not to parse the data on each page separately. Those. all at once, break them down somehow. Or parse, but parse into memory. In general, to load everything en masse into memory - why?
Break them into blocks, process them when received from the server - put the news headlines in a separate file (if necessary), this info will also contain the name of a separate json file with the news. then load it and work with it. Well, or something like that, few details were given.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question