bchavez / RethinkDb.Driver

:headphones: A NoSQL C#/.NET RethinkDB database driver with 100% ReQL API coverage.
http://rethinkdb.com/api/java
Other
384 stars 134 forks source link

IsJToken returns false for JToken #78

Closed oliverjanik closed 8 years ago

oliverjanik commented 8 years ago

RethinkDb.Driver.Utils.ExtensionsForType has this method:

    public static bool IsJToken(this Type type)
    {
      return ExtensionsForType.IsASubclassOf(type, typeof (JToken));
    }

This only returns true if type is a subclass of JToken not JToken itself.

This is causing different output when I ask for JToken rather than JObject.