-Documentation

-Fixed potential casting error when writing JSON using a JsonReader
This commit is contained in:
JamesNK
2011-10-01 11:32:48 +00:00
parent b5f5db5624
commit 4f947d9207
3 changed files with 402 additions and 375 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
<h3>Conversion Rules</h3>
<ul>
<li>Elements remain unchanged. </li>
<li>Attributes are prefixed with an @. </li>
<li>Attributes are prefixed with an @ and should be at the start of the object. </li>
<li>Single child text nodes are a value directly against an element, otherwise they
are accessed via #text. </li>
<li>The XML declaration and processing instructions are prefixed with ?. </li>
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -353,16 +353,16 @@ namespace Newtonsoft.Json
WriteComment(reader.Value.ToString());
break;
case JsonToken.Integer:
WriteValue((long)reader.Value);
WriteValue(Convert.ToInt64(reader.Value));
break;
case JsonToken.Float:
WriteValue((double)reader.Value);
WriteValue(Convert.ToDouble(reader.Value));
break;
case JsonToken.String:
WriteValue(reader.Value.ToString());
break;
case JsonToken.Boolean:
WriteValue((bool)reader.Value);
WriteValue(Convert.ToBoolean(reader.Value));
break;
case JsonToken.Null:
WriteNull();