-Modified project to support signed flag. Does not output InternalsVisibleTo attributes when present

-Improved error message on JObject and JArray Load method
-Added WriteRawValue
-Added missing XML documentation
-Added SerializeObject overload that takes a formatting flag
This commit is contained in:
JamesNK
2008-10-08 09:01:55 +00:00
parent 5bb0c17eec
commit 3038a8d79e
15 changed files with 144 additions and 207 deletions
+9 -6
View File
@@ -372,7 +372,7 @@ namespace Newtonsoft.Json
WriteValue((DateTime)reader.Value);
break;
case JsonToken.Raw:
WriteRaw((string)reader.Value, true);
WriteRawValue((string)reader.Value);
break;
default:
throw MiscellaneousUtils.CreateArgumentOutOfRangeException("TokenType", reader.TokenType, "Unexpected token type.");
@@ -608,19 +608,22 @@ namespace Newtonsoft.Json
}
/// <summary>
/// Writes raw JSON.
/// Writes raw JSON without changing the writer's state.
/// </summary>
/// <param name="json">The raw JSON to write.</param>
public virtual void WriteRaw(string json)
{
}
internal void WriteRaw(string json, bool autoCompleteValue)
/// <summary>
/// Writes raw JSON where a value is expected and updates the writer's state.
/// </summary>
/// <param name="json">The raw JSON to write.</param>
public virtual void WriteRawValue(string json)
{
WriteRaw(json);
// hack
if (autoCompleteValue)
AutoComplete(JsonToken.Undefined);
// hack. want writer to change state as if a value had been written
AutoComplete(JsonToken.Undefined);
}
/// <summary>