I have a WCF service operation that returns an object with long
and List<string>
properties. When I test the operation in a WCF application, everything works fine and the values are correct. However, I need to be able to call the service using jQuery and JSON format. The value of the long
property apparently changes when I read it back in the OnSucceed
function.
After searching I've found that JSON.stringify
changes big values. So in code like this:
alert(JSON.stringify(25001509088465005));
...it will show the value as 25001509088465004
.
What is happening?
Demo here: http://jsfiddle.net/naveen/tPKw7/
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…