-Added WriteValue(object) to JsonWriter
-Added JTokenEqualityComparer -Added additional validation to new IDictionary/ICollection methods on JObject/JArray -Changed JObject so that properties must have a unique name -Changed remaining IConvertible calls to use ToXXX methods instead of casting -Fixed many bugs in new IDictionary/ICollection methods on JObject/JArray -Fixed AddFirst when no existing children
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Newtonsoft.Json.Linq
|
||||
{
|
||||
public class JTokenEqualityComparer : IEqualityComparer<JToken>
|
||||
{
|
||||
public bool Equals(JToken x, JToken y)
|
||||
{
|
||||
return JToken.DeepEquals(x, y);
|
||||
}
|
||||
|
||||
public int GetHashCode(JToken obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return 0;
|
||||
|
||||
return obj.GetDeepHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user