Making API call every 5 seconds in C#
up vote
0
down vote
favorite
I'm trying to develop a mobile app on Xamarin Forms platform.I'm getting data from API.API call only happened once only when the application is opened. I'm Listing livescores between teams in a ListView . For example the minutes of the match 25 for now.I'm waiting 2 minutes and nothing changed. The minute is the same on my ListView.When I close and open the app again minute is changing.I just want to make call every 5 second to refresh the data without close the application.
Here is my code.
public List<liveScoreData>liveScore()
{
var result = new List<liveScoreData>();
try
{
Guid guidSifre = Guid.NewGuid();
string guid = guidSifre.ToString();
string result = CreateMD5forChecksum(guid);
using (var client = new WebClient())
{
var values = new NameValueCollection();
values["result"] = result;
values["guid"] = guid;
var response = client.UploadValues("http://abcd.com/admin/LiveScore", values);
var responseString = Encoding.Default.GetString(response);
var responseResult = JsonConvert.DeserializeObject(responseString);
result = JsonConvert.DeserializeObject<List<liveScoreData>>(responseResult.ToString());
Mehmet.liveScoreDataList = result;
}
}
catch (Exception ex)
{
var exc = ex;
}
return result;
}
c# api xamarin call
add a comment |
up vote
0
down vote
favorite
I'm trying to develop a mobile app on Xamarin Forms platform.I'm getting data from API.API call only happened once only when the application is opened. I'm Listing livescores between teams in a ListView . For example the minutes of the match 25 for now.I'm waiting 2 minutes and nothing changed. The minute is the same on my ListView.When I close and open the app again minute is changing.I just want to make call every 5 second to refresh the data without close the application.
Here is my code.
public List<liveScoreData>liveScore()
{
var result = new List<liveScoreData>();
try
{
Guid guidSifre = Guid.NewGuid();
string guid = guidSifre.ToString();
string result = CreateMD5forChecksum(guid);
using (var client = new WebClient())
{
var values = new NameValueCollection();
values["result"] = result;
values["guid"] = guid;
var response = client.UploadValues("http://abcd.com/admin/LiveScore", values);
var responseString = Encoding.Default.GetString(response);
var responseResult = JsonConvert.DeserializeObject(responseString);
result = JsonConvert.DeserializeObject<List<liveScoreData>>(responseResult.ToString());
Mehmet.liveScoreDataList = result;
}
}
catch (Exception ex)
{
var exc = ex;
}
return result;
}
c# api xamarin call
1
Why do you get a string, deserialize to object, turn it back to a string, and then deserialize it again?
– Jamiec
Nov 19 at 12:49
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to develop a mobile app on Xamarin Forms platform.I'm getting data from API.API call only happened once only when the application is opened. I'm Listing livescores between teams in a ListView . For example the minutes of the match 25 for now.I'm waiting 2 minutes and nothing changed. The minute is the same on my ListView.When I close and open the app again minute is changing.I just want to make call every 5 second to refresh the data without close the application.
Here is my code.
public List<liveScoreData>liveScore()
{
var result = new List<liveScoreData>();
try
{
Guid guidSifre = Guid.NewGuid();
string guid = guidSifre.ToString();
string result = CreateMD5forChecksum(guid);
using (var client = new WebClient())
{
var values = new NameValueCollection();
values["result"] = result;
values["guid"] = guid;
var response = client.UploadValues("http://abcd.com/admin/LiveScore", values);
var responseString = Encoding.Default.GetString(response);
var responseResult = JsonConvert.DeserializeObject(responseString);
result = JsonConvert.DeserializeObject<List<liveScoreData>>(responseResult.ToString());
Mehmet.liveScoreDataList = result;
}
}
catch (Exception ex)
{
var exc = ex;
}
return result;
}
c# api xamarin call
I'm trying to develop a mobile app on Xamarin Forms platform.I'm getting data from API.API call only happened once only when the application is opened. I'm Listing livescores between teams in a ListView . For example the minutes of the match 25 for now.I'm waiting 2 minutes and nothing changed. The minute is the same on my ListView.When I close and open the app again minute is changing.I just want to make call every 5 second to refresh the data without close the application.
Here is my code.
public List<liveScoreData>liveScore()
{
var result = new List<liveScoreData>();
try
{
Guid guidSifre = Guid.NewGuid();
string guid = guidSifre.ToString();
string result = CreateMD5forChecksum(guid);
using (var client = new WebClient())
{
var values = new NameValueCollection();
values["result"] = result;
values["guid"] = guid;
var response = client.UploadValues("http://abcd.com/admin/LiveScore", values);
var responseString = Encoding.Default.GetString(response);
var responseResult = JsonConvert.DeserializeObject(responseString);
result = JsonConvert.DeserializeObject<List<liveScoreData>>(responseResult.ToString());
Mehmet.liveScoreDataList = result;
}
}
catch (Exception ex)
{
var exc = ex;
}
return result;
}
c# api xamarin call
c# api xamarin call
edited Nov 19 at 12:46
Sir Rufo
14.3k22757
14.3k22757
asked Nov 19 at 11:54
İsmail Çapkın
112
112
1
Why do you get a string, deserialize to object, turn it back to a string, and then deserialize it again?
– Jamiec
Nov 19 at 12:49
add a comment |
1
Why do you get a string, deserialize to object, turn it back to a string, and then deserialize it again?
– Jamiec
Nov 19 at 12:49
1
1
Why do you get a string, deserialize to object, turn it back to a string, and then deserialize it again?
– Jamiec
Nov 19 at 12:49
Why do you get a string, deserialize to object, turn it back to a string, and then deserialize it again?
– Jamiec
Nov 19 at 12:49
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
What you can do is implement my special PollingTimer.cs class:
using System;
using System.Threading;
using Xamarin.Forms;
namespace AppNamespace.Helpers
{
/// <summary>
/// This timer is used to poll the middleware for new information.
/// </summary>
public class PollingTimer
{
private readonly TimeSpan timespan;
private readonly Action callback;
private CancellationTokenSource cancellation;
/// <summary>
/// Initializes a new instance of the <see cref="T:CryptoTracker.Helpers.PollingTimer"/> class.
/// </summary>
/// <param name="timespan">The amount of time between each call</param>
/// <param name="callback">The callback procedure.</param>
public PollingTimer(TimeSpan timespan, Action callback)
{
this.timespan = timespan;
this.callback = callback;
this.cancellation = new CancellationTokenSource();
}
/// <summary>
/// Starts the timer.
/// </summary>
public void Start()
{
CancellationTokenSource cts = this.cancellation; // safe copy
Device.StartTimer(this.timespan,
() => {
if (cts.IsCancellationRequested) return false;
this.callback.Invoke();
return true; // or true for periodic behavior
});
}
/// <summary>
/// Stops the timer.
/// </summary>
public void Stop()
{
Interlocked.Exchange(ref this.cancellation, new CancellationTokenSource()).Cancel();
}
}
}
Then what you can do following that is in your page that you want to make a call every 5 seconds from, in the constructor at the end of it you can write this line of code:
timer = new PollingTimer(TimeSpan.FromSeconds(5), liveScore);
This will run your method every 5 seconds. To make your method work with the pollingtimer you must edit your method to a void and return the value to a global variable like so:
//Make a global variable for your method to access
List<liveScoreData> globalLiveScore = new List<liveScoreData>();
public void liveScore()
{
var result = new List<liveScoreData>();
try
{
Guid guidSifre = Guid.NewGuid();
string guid = guidSifre.ToString();
string result = CreateMD5forChecksum(guid);
using (var client = new WebClient())
{
var values = new NameValueCollection();
values["result"] = result;
values["guid"] = guid;
var response = client.UploadValues("http://abcd.com/admin/LiveScore", values);
var responseString = Encoding.Default.GetString(response);
var responseResult = JsonConvert.DeserializeObject(responseString);
result = JsonConvert.DeserializeObject<List<liveScoreData>>(responseResult.ToString());
Mehmet.liveScoreDataList = result;
}
}
catch (Exception ex)
{
var exc = ex;
}
globalLiveScore = result;
}
Then from there you can check your live score data in other methods. Then in your OnAppearing method you can run
timer.Start();
and in your OnDisappearing method you can run
timer.Stop();
have a play with it and see if you can put it in better places for optimal performance etc.
You lost my upvote here:...you must edit your method to a void and return the value to a global variable...
. You could improve yourPollingTimer
hugely by making it generic, representing the return type of the thing its polling over, and supplying a method to call with the result each poll.
– Jamiec
Nov 19 at 12:51
add a comment |
up vote
0
down vote
You could use the System.Threading.Timer
object
and simply initialize it like this
`System.Threading.Timer myTimer = new System.Threading.Timer((e) =>
{
liveScore(); //your function call
}, null,
TimeSpan.FromSeconds(0), //start immediately
TimeSpan.FromSeconds(5)); //execute every 5 secs`
Thank you for your answer but i tried it didnt work .
– İsmail Çapkın
Nov 21 at 6:23
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
What you can do is implement my special PollingTimer.cs class:
using System;
using System.Threading;
using Xamarin.Forms;
namespace AppNamespace.Helpers
{
/// <summary>
/// This timer is used to poll the middleware for new information.
/// </summary>
public class PollingTimer
{
private readonly TimeSpan timespan;
private readonly Action callback;
private CancellationTokenSource cancellation;
/// <summary>
/// Initializes a new instance of the <see cref="T:CryptoTracker.Helpers.PollingTimer"/> class.
/// </summary>
/// <param name="timespan">The amount of time between each call</param>
/// <param name="callback">The callback procedure.</param>
public PollingTimer(TimeSpan timespan, Action callback)
{
this.timespan = timespan;
this.callback = callback;
this.cancellation = new CancellationTokenSource();
}
/// <summary>
/// Starts the timer.
/// </summary>
public void Start()
{
CancellationTokenSource cts = this.cancellation; // safe copy
Device.StartTimer(this.timespan,
() => {
if (cts.IsCancellationRequested) return false;
this.callback.Invoke();
return true; // or true for periodic behavior
});
}
/// <summary>
/// Stops the timer.
/// </summary>
public void Stop()
{
Interlocked.Exchange(ref this.cancellation, new CancellationTokenSource()).Cancel();
}
}
}
Then what you can do following that is in your page that you want to make a call every 5 seconds from, in the constructor at the end of it you can write this line of code:
timer = new PollingTimer(TimeSpan.FromSeconds(5), liveScore);
This will run your method every 5 seconds. To make your method work with the pollingtimer you must edit your method to a void and return the value to a global variable like so:
//Make a global variable for your method to access
List<liveScoreData> globalLiveScore = new List<liveScoreData>();
public void liveScore()
{
var result = new List<liveScoreData>();
try
{
Guid guidSifre = Guid.NewGuid();
string guid = guidSifre.ToString();
string result = CreateMD5forChecksum(guid);
using (var client = new WebClient())
{
var values = new NameValueCollection();
values["result"] = result;
values["guid"] = guid;
var response = client.UploadValues("http://abcd.com/admin/LiveScore", values);
var responseString = Encoding.Default.GetString(response);
var responseResult = JsonConvert.DeserializeObject(responseString);
result = JsonConvert.DeserializeObject<List<liveScoreData>>(responseResult.ToString());
Mehmet.liveScoreDataList = result;
}
}
catch (Exception ex)
{
var exc = ex;
}
globalLiveScore = result;
}
Then from there you can check your live score data in other methods. Then in your OnAppearing method you can run
timer.Start();
and in your OnDisappearing method you can run
timer.Stop();
have a play with it and see if you can put it in better places for optimal performance etc.
You lost my upvote here:...you must edit your method to a void and return the value to a global variable...
. You could improve yourPollingTimer
hugely by making it generic, representing the return type of the thing its polling over, and supplying a method to call with the result each poll.
– Jamiec
Nov 19 at 12:51
add a comment |
up vote
0
down vote
What you can do is implement my special PollingTimer.cs class:
using System;
using System.Threading;
using Xamarin.Forms;
namespace AppNamespace.Helpers
{
/// <summary>
/// This timer is used to poll the middleware for new information.
/// </summary>
public class PollingTimer
{
private readonly TimeSpan timespan;
private readonly Action callback;
private CancellationTokenSource cancellation;
/// <summary>
/// Initializes a new instance of the <see cref="T:CryptoTracker.Helpers.PollingTimer"/> class.
/// </summary>
/// <param name="timespan">The amount of time between each call</param>
/// <param name="callback">The callback procedure.</param>
public PollingTimer(TimeSpan timespan, Action callback)
{
this.timespan = timespan;
this.callback = callback;
this.cancellation = new CancellationTokenSource();
}
/// <summary>
/// Starts the timer.
/// </summary>
public void Start()
{
CancellationTokenSource cts = this.cancellation; // safe copy
Device.StartTimer(this.timespan,
() => {
if (cts.IsCancellationRequested) return false;
this.callback.Invoke();
return true; // or true for periodic behavior
});
}
/// <summary>
/// Stops the timer.
/// </summary>
public void Stop()
{
Interlocked.Exchange(ref this.cancellation, new CancellationTokenSource()).Cancel();
}
}
}
Then what you can do following that is in your page that you want to make a call every 5 seconds from, in the constructor at the end of it you can write this line of code:
timer = new PollingTimer(TimeSpan.FromSeconds(5), liveScore);
This will run your method every 5 seconds. To make your method work with the pollingtimer you must edit your method to a void and return the value to a global variable like so:
//Make a global variable for your method to access
List<liveScoreData> globalLiveScore = new List<liveScoreData>();
public void liveScore()
{
var result = new List<liveScoreData>();
try
{
Guid guidSifre = Guid.NewGuid();
string guid = guidSifre.ToString();
string result = CreateMD5forChecksum(guid);
using (var client = new WebClient())
{
var values = new NameValueCollection();
values["result"] = result;
values["guid"] = guid;
var response = client.UploadValues("http://abcd.com/admin/LiveScore", values);
var responseString = Encoding.Default.GetString(response);
var responseResult = JsonConvert.DeserializeObject(responseString);
result = JsonConvert.DeserializeObject<List<liveScoreData>>(responseResult.ToString());
Mehmet.liveScoreDataList = result;
}
}
catch (Exception ex)
{
var exc = ex;
}
globalLiveScore = result;
}
Then from there you can check your live score data in other methods. Then in your OnAppearing method you can run
timer.Start();
and in your OnDisappearing method you can run
timer.Stop();
have a play with it and see if you can put it in better places for optimal performance etc.
You lost my upvote here:...you must edit your method to a void and return the value to a global variable...
. You could improve yourPollingTimer
hugely by making it generic, representing the return type of the thing its polling over, and supplying a method to call with the result each poll.
– Jamiec
Nov 19 at 12:51
add a comment |
up vote
0
down vote
up vote
0
down vote
What you can do is implement my special PollingTimer.cs class:
using System;
using System.Threading;
using Xamarin.Forms;
namespace AppNamespace.Helpers
{
/// <summary>
/// This timer is used to poll the middleware for new information.
/// </summary>
public class PollingTimer
{
private readonly TimeSpan timespan;
private readonly Action callback;
private CancellationTokenSource cancellation;
/// <summary>
/// Initializes a new instance of the <see cref="T:CryptoTracker.Helpers.PollingTimer"/> class.
/// </summary>
/// <param name="timespan">The amount of time between each call</param>
/// <param name="callback">The callback procedure.</param>
public PollingTimer(TimeSpan timespan, Action callback)
{
this.timespan = timespan;
this.callback = callback;
this.cancellation = new CancellationTokenSource();
}
/// <summary>
/// Starts the timer.
/// </summary>
public void Start()
{
CancellationTokenSource cts = this.cancellation; // safe copy
Device.StartTimer(this.timespan,
() => {
if (cts.IsCancellationRequested) return false;
this.callback.Invoke();
return true; // or true for periodic behavior
});
}
/// <summary>
/// Stops the timer.
/// </summary>
public void Stop()
{
Interlocked.Exchange(ref this.cancellation, new CancellationTokenSource()).Cancel();
}
}
}
Then what you can do following that is in your page that you want to make a call every 5 seconds from, in the constructor at the end of it you can write this line of code:
timer = new PollingTimer(TimeSpan.FromSeconds(5), liveScore);
This will run your method every 5 seconds. To make your method work with the pollingtimer you must edit your method to a void and return the value to a global variable like so:
//Make a global variable for your method to access
List<liveScoreData> globalLiveScore = new List<liveScoreData>();
public void liveScore()
{
var result = new List<liveScoreData>();
try
{
Guid guidSifre = Guid.NewGuid();
string guid = guidSifre.ToString();
string result = CreateMD5forChecksum(guid);
using (var client = new WebClient())
{
var values = new NameValueCollection();
values["result"] = result;
values["guid"] = guid;
var response = client.UploadValues("http://abcd.com/admin/LiveScore", values);
var responseString = Encoding.Default.GetString(response);
var responseResult = JsonConvert.DeserializeObject(responseString);
result = JsonConvert.DeserializeObject<List<liveScoreData>>(responseResult.ToString());
Mehmet.liveScoreDataList = result;
}
}
catch (Exception ex)
{
var exc = ex;
}
globalLiveScore = result;
}
Then from there you can check your live score data in other methods. Then in your OnAppearing method you can run
timer.Start();
and in your OnDisappearing method you can run
timer.Stop();
have a play with it and see if you can put it in better places for optimal performance etc.
What you can do is implement my special PollingTimer.cs class:
using System;
using System.Threading;
using Xamarin.Forms;
namespace AppNamespace.Helpers
{
/// <summary>
/// This timer is used to poll the middleware for new information.
/// </summary>
public class PollingTimer
{
private readonly TimeSpan timespan;
private readonly Action callback;
private CancellationTokenSource cancellation;
/// <summary>
/// Initializes a new instance of the <see cref="T:CryptoTracker.Helpers.PollingTimer"/> class.
/// </summary>
/// <param name="timespan">The amount of time between each call</param>
/// <param name="callback">The callback procedure.</param>
public PollingTimer(TimeSpan timespan, Action callback)
{
this.timespan = timespan;
this.callback = callback;
this.cancellation = new CancellationTokenSource();
}
/// <summary>
/// Starts the timer.
/// </summary>
public void Start()
{
CancellationTokenSource cts = this.cancellation; // safe copy
Device.StartTimer(this.timespan,
() => {
if (cts.IsCancellationRequested) return false;
this.callback.Invoke();
return true; // or true for periodic behavior
});
}
/// <summary>
/// Stops the timer.
/// </summary>
public void Stop()
{
Interlocked.Exchange(ref this.cancellation, new CancellationTokenSource()).Cancel();
}
}
}
Then what you can do following that is in your page that you want to make a call every 5 seconds from, in the constructor at the end of it you can write this line of code:
timer = new PollingTimer(TimeSpan.FromSeconds(5), liveScore);
This will run your method every 5 seconds. To make your method work with the pollingtimer you must edit your method to a void and return the value to a global variable like so:
//Make a global variable for your method to access
List<liveScoreData> globalLiveScore = new List<liveScoreData>();
public void liveScore()
{
var result = new List<liveScoreData>();
try
{
Guid guidSifre = Guid.NewGuid();
string guid = guidSifre.ToString();
string result = CreateMD5forChecksum(guid);
using (var client = new WebClient())
{
var values = new NameValueCollection();
values["result"] = result;
values["guid"] = guid;
var response = client.UploadValues("http://abcd.com/admin/LiveScore", values);
var responseString = Encoding.Default.GetString(response);
var responseResult = JsonConvert.DeserializeObject(responseString);
result = JsonConvert.DeserializeObject<List<liveScoreData>>(responseResult.ToString());
Mehmet.liveScoreDataList = result;
}
}
catch (Exception ex)
{
var exc = ex;
}
globalLiveScore = result;
}
Then from there you can check your live score data in other methods. Then in your OnAppearing method you can run
timer.Start();
and in your OnDisappearing method you can run
timer.Stop();
have a play with it and see if you can put it in better places for optimal performance etc.
answered Nov 19 at 12:32
James Mallon
231110
231110
You lost my upvote here:...you must edit your method to a void and return the value to a global variable...
. You could improve yourPollingTimer
hugely by making it generic, representing the return type of the thing its polling over, and supplying a method to call with the result each poll.
– Jamiec
Nov 19 at 12:51
add a comment |
You lost my upvote here:...you must edit your method to a void and return the value to a global variable...
. You could improve yourPollingTimer
hugely by making it generic, representing the return type of the thing its polling over, and supplying a method to call with the result each poll.
– Jamiec
Nov 19 at 12:51
You lost my upvote here:
...you must edit your method to a void and return the value to a global variable...
. You could improve your PollingTimer
hugely by making it generic, representing the return type of the thing its polling over, and supplying a method to call with the result each poll.– Jamiec
Nov 19 at 12:51
You lost my upvote here:
...you must edit your method to a void and return the value to a global variable...
. You could improve your PollingTimer
hugely by making it generic, representing the return type of the thing its polling over, and supplying a method to call with the result each poll.– Jamiec
Nov 19 at 12:51
add a comment |
up vote
0
down vote
You could use the System.Threading.Timer
object
and simply initialize it like this
`System.Threading.Timer myTimer = new System.Threading.Timer((e) =>
{
liveScore(); //your function call
}, null,
TimeSpan.FromSeconds(0), //start immediately
TimeSpan.FromSeconds(5)); //execute every 5 secs`
Thank you for your answer but i tried it didnt work .
– İsmail Çapkın
Nov 21 at 6:23
add a comment |
up vote
0
down vote
You could use the System.Threading.Timer
object
and simply initialize it like this
`System.Threading.Timer myTimer = new System.Threading.Timer((e) =>
{
liveScore(); //your function call
}, null,
TimeSpan.FromSeconds(0), //start immediately
TimeSpan.FromSeconds(5)); //execute every 5 secs`
Thank you for your answer but i tried it didnt work .
– İsmail Çapkın
Nov 21 at 6:23
add a comment |
up vote
0
down vote
up vote
0
down vote
You could use the System.Threading.Timer
object
and simply initialize it like this
`System.Threading.Timer myTimer = new System.Threading.Timer((e) =>
{
liveScore(); //your function call
}, null,
TimeSpan.FromSeconds(0), //start immediately
TimeSpan.FromSeconds(5)); //execute every 5 secs`
You could use the System.Threading.Timer
object
and simply initialize it like this
`System.Threading.Timer myTimer = new System.Threading.Timer((e) =>
{
liveScore(); //your function call
}, null,
TimeSpan.FromSeconds(0), //start immediately
TimeSpan.FromSeconds(5)); //execute every 5 secs`
answered Nov 19 at 12:56
Madenis
13729
13729
Thank you for your answer but i tried it didnt work .
– İsmail Çapkın
Nov 21 at 6:23
add a comment |
Thank you for your answer but i tried it didnt work .
– İsmail Çapkın
Nov 21 at 6:23
Thank you for your answer but i tried it didnt work .
– İsmail Çapkın
Nov 21 at 6:23
Thank you for your answer but i tried it didnt work .
– İsmail Çapkın
Nov 21 at 6:23
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53374096%2fmaking-api-call-every-5-seconds-in-c-sharp%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Why do you get a string, deserialize to object, turn it back to a string, and then deserialize it again?
– Jamiec
Nov 19 at 12:49