Ejemplo n.º 1
0
        /// <summary>
        /// Parses a JSON string into the specified object type
        /// </summary>
        /// <param name="json">The JSON-encoded string you want to deserialize</param>
        /// <param name="type">The object type you want your json string deserialized into</param>
        /// <returns>Object of type Type</returns>
        public static object Deserialize(string json, Type type)
        {
            //Deserialize the json into a generic object
            object o = Deserialize(json);

            //Clear the Reflection caches
            PropertyCache.Clear();
            ConstructorCache.Clear();

            //Convert generic object to the specified Type
            return(Deserialize(o, type));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Clears all plugin assemblies and type info.
 /// </summary>
 public void UnInit()
 {
     Assemblies.Clear();
     ConstructorCache.Clear();
 }