Bug: Unexpected token: Comment

Can't deserialize json to XElement back if original XElement had a comment
This commit is contained in:
yeroo
2014-11-21 17:33:38 -06:00
parent b5ef767774
commit d856b1c858
@@ -1580,6 +1580,9 @@ namespace Newtonsoft.Json.Converters
case JsonToken.EndObject:
finishedElement = true;
break;
case JsonToken.Comment:
finishedElement = true;
break;
default:
throw new JsonSerializationException("Unexpected JsonToken: " + reader.TokenType);
}