Json.NET 2.0 Beta
New feature - LINQ to JSON! New feature - Ability to specify how JsonSerializer handles null values when serializing/deserializing. New feature - Ability to specify how JsonSerializer handles missing values when deserializing. Change - Improved support for reading and writing JavaScript constructors. Change - A new JsonWriter can now write additional tokens without erroring. Bug fix - JsonSerializer handles deserializing dictionaries where the key isn't a string. Bug fix - JsonReader now correctly parses hex character codes.
This commit is contained in:
@@ -29,11 +29,19 @@ using System.Collections.ObjectModel;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
|
||||
namespace Newtonsoft.Json.Utilities
|
||||
{
|
||||
internal static class CollectionUtils
|
||||
{
|
||||
public static IEnumerable<T> CastValid<T>(this IEnumerable enumerable)
|
||||
{
|
||||
ValidationUtils.ArgumentNotNull(enumerable, "enumerable");
|
||||
|
||||
return enumerable.Cast<object>().Where(o => o is T).Cast<T>();
|
||||
}
|
||||
|
||||
public static List<T> CreateList<T>(params T[] values)
|
||||
{
|
||||
return new List<T>(values);
|
||||
|
||||
Reference in New Issue
Block a user