-Added IJsonLineInfo. Implemented by JsonTextReader, JsonTokenReader, JsonValidatingReader, JToken
-Added line details to JsonTextReader exception messages and JsonValidatingReader errors -Change JsonSchemaGenerator to disable additional properties on sealed classes -Fixed JsonSchemaGenerator to not output enum values and options for flag enums
This commit is contained in:
@@ -175,11 +175,10 @@ namespace Newtonsoft.Json.Linq
|
||||
}
|
||||
|
||||
if (reader.TokenType != JsonToken.StartConstructor)
|
||||
throw new Exception(
|
||||
"Error reading JConstructor from JsonReader. Current JsonReader item is not a constructor: {0}".FormatWith(
|
||||
CultureInfo.InvariantCulture, reader.TokenType));
|
||||
throw new Exception("Error reading JConstructor from JsonReader. Current JsonReader item is not a constructor: {0}".FormatWith(CultureInfo.InvariantCulture, reader.TokenType));
|
||||
|
||||
JConstructor c = new JConstructor((string)reader.Value);
|
||||
c.SetLineInfo(reader as IJsonLineInfo);
|
||||
|
||||
if (!reader.Read())
|
||||
throw new Exception("Error reading JConstructor from JsonReader.");
|
||||
|
||||
Reference in New Issue
Block a user