/// <summary> /// Helper method to hydrate an object using the string response from the specified URL resource /// and without requiring a <see cref="T:Geocrest.Model.RestHelper"/>. /// </summary> /// <typeparam name="T">The type of object to hydrate.</typeparam> /// <param name="url">The web service URL.</param> /// <returns>The hydrated object.</returns> public static T HydrateObject <T>(string url) { RestHelper helper = new RestHelper(); return(helper.Hydrate <T>(ForceJsonFormat(url))); }
/// <summary> /// Helper method to hydrate an object from a json string representation /// and without requiring a <see cref="T:Geocrest.Model.RestHelper"/>. /// </summary> /// <typeparam name="T">The type of object to hydrate.</typeparam> /// <param name="json">The string representation of json used to deserialize.</param> /// <returns>The hydrated object.</returns> public static T HydrateObjectFromJson <T>(string json) { RestHelper helper = new RestHelper(); return(helper.HydrateFromJson <T>(json)); }