-Documentation
-Fixed potential casting error when writing JSON using a JsonReader
This commit is contained in:
@@ -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
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user