-Add support for reading octal and hexadecimal numbers from JSON

-Fix serializing indexed properties
-Fix serializing JRaw properties
This commit is contained in:
JamesNK
2010-01-08 08:12:40 +00:00
parent 324c4e4bc5
commit 75649bfa00
14 changed files with 236 additions and 78 deletions
@@ -79,21 +79,14 @@ namespace Newtonsoft.Json.Schema
private JsonSchemaResolver _resolver;
private IList<TypeSchema> _stack = new List<TypeSchema>();
private JsonSchema _currentSchema;
private Type _currentType;
private JsonSchema CurrentSchema
{
get { return _currentSchema; }
}
private Type CurrentType
{
get { return _currentType; }
}
private void Push(TypeSchema typeSchema)
{
_currentType = typeSchema.Type;
_currentSchema = typeSchema.Schema;
_stack.Add(typeSchema);
_resolver.LoadedSchemas.Add(typeSchema.Schema);
@@ -106,12 +99,10 @@ namespace Newtonsoft.Json.Schema
TypeSchema newValue = _stack.LastOrDefault();
if (newValue != null)
{
_currentType = newValue.Type;
_currentSchema = newValue.Schema;
}
else
{
_currentType = null;
_currentSchema = null;
}