diff --git a/src/SimpleJson/SimpleJson.cs b/src/SimpleJson/SimpleJson.cs index 2ab9742..69e3362 100644 --- a/src/SimpleJson/SimpleJson.cs +++ b/src/SimpleJson/SimpleJson.cs @@ -42,7 +42,7 @@ // usually already defined in properties //#define NETFX_CORE; -// If you are targetting WinStore, WP8 and NET4.5+ PCL make sure to #define SIMPLE_JSON_TYPEINFO; +// If you are targeting WinStore, WP8 and NET4.5+ PCL make sure to #define SIMPLE_JSON_TYPEINFO; // original json parsing code from http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html @@ -352,7 +352,7 @@ public override string ToString() /// Provides information about the conversion operation. The binder.Type property provides the type to which the object must be converted. For example, for the statement (String)sampleObject in C# (CType(sampleObject, Type) in Visual Basic), where sampleObject is an instance of the class derived from the class, binder.Type returns the type. The binder.Explicit property provides information about the kind of conversion that occurs. It returns true for explicit conversion and false for implicit conversion. /// The result of the type conversion operation. /// - /// Alwasy returns true. + /// Always returns true. /// public override bool TryConvert(ConvertBinder binder, out object result) { @@ -379,7 +379,7 @@ public override bool TryConvert(ConvertBinder binder, out object result) /// /// Provides information about the deletion. /// - /// Alwasy returns true. + /// Always returns true. /// public override bool TryDeleteMember(DeleteMemberBinder binder) { @@ -397,7 +397,7 @@ public override bool TryDeleteMember(DeleteMemberBinder binder) /// The indexes that are used in the operation. For example, for the sampleObject[3] operation in C# (sampleObject(3) in Visual Basic), where sampleObject is derived from the DynamicObject class, is equal to 3. /// The result of the index operation. /// - /// Alwasy returns true. + /// Always returns true. /// public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result) { @@ -417,7 +417,7 @@ public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out ob /// Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member on which the dynamic operation is performed. For example, for the Console.WriteLine(sampleObject.SampleProperty) statement, where sampleObject is an instance of the class derived from the class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive. /// The result of the get operation. For example, if the method is called for a property, you can assign the property value to . /// - /// Alwasy returns true. + /// Always returns true. /// public override bool TryGetMember(GetMemberBinder binder, out object result) { @@ -554,7 +554,7 @@ public static object DeserializeObject(string json) /// The object. /// /// - /// Returns true if successfull otherwise false. + /// Returns true if successful otherwise false. /// [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification="Need to support .NET 2")] public static bool TryDeserializeObject(string json, out object obj) @@ -1260,7 +1260,7 @@ class PocoJsonSerializerStrategy : IJsonSerializerStrategy public PocoJsonSerializerStrategy() { - ConstructorCache = new ReflectionUtils.ThreadSafeDictionary(ContructorDelegateFactory); + ConstructorCache = new ReflectionUtils.ThreadSafeDictionary(ConstructorDelegateFactory); GetCache = new ReflectionUtils.ThreadSafeDictionary>(GetterValueFactory); SetCache = new ReflectionUtils.ThreadSafeDictionary>>(SetterValueFactory); } @@ -1270,9 +1270,9 @@ protected virtual string MapClrMemberNameToJsonFieldName(string clrPropertyName) return clrPropertyName; } - internal virtual ReflectionUtils.ConstructorDelegate ContructorDelegateFactory(Type key) + internal virtual ReflectionUtils.ConstructorDelegate ConstructorDelegateFactory(Type key) { - return ReflectionUtils.GetContructor(key, key.IsArray ? ArrayConstructorParameterTypes : EmptyTypes); + return ReflectionUtils.GetConstructor(key, key.IsArray ? ArrayConstructorParameterTypes : EmptyTypes); } internal virtual IDictionary GetterValueFactory(Type type) @@ -1447,7 +1447,7 @@ public virtual object DeserializeObject(object value, Type type) foreach (object o in jsonObject) list[i++] = DeserializeObject(o, type.GetElementType()); } - else if (ReflectionUtils.IsTypeGenericeCollectionInterface(type) || ReflectionUtils.IsAssignableFrom(typeof(IList), type)) + else if (ReflectionUtils.IsTypeGenericCollectionInterface(type) || ReflectionUtils.IsAssignableFrom(typeof(IList), type)) { Type innerType = ReflectionUtils.GetGenericListElementType(type); list = (IList)(ConstructorCache[type] ?? ConstructorCache[typeof(List<>).MakeGenericType(innerType)])(jsonObject.Count); @@ -1685,7 +1685,7 @@ public static bool IsTypeGeneric(Type type) return GetTypeInfo(type).IsGenericType; } - public static bool IsTypeGenericeCollectionInterface(Type type) + public static bool IsTypeGenericCollectionInterface(Type type) { if (!IsTypeGeneric(type)) return false; @@ -1812,7 +1812,7 @@ public static MethodInfo GetSetterMethodInfo(PropertyInfo propertyInfo) #endif } - public static ConstructorDelegate GetContructor(ConstructorInfo constructorInfo) + public static ConstructorDelegate GetConstructor(ConstructorInfo constructorInfo) { #if SIMPLE_JSON_NO_LINQ_EXPRESSION return GetConstructorByReflection(constructorInfo); @@ -1821,7 +1821,7 @@ public static ConstructorDelegate GetContructor(ConstructorInfo constructorInfo) #endif } - public static ConstructorDelegate GetContructor(Type type, params Type[] argsType) + public static ConstructorDelegate GetConstructor(Type type, params Type[] argsType) { #if SIMPLE_JSON_NO_LINQ_EXPRESSION return GetConstructorByReflection(type, argsType);