just added this three lines in my WebApiConfig.cs file...
var json = config.Formatters.JsonFormatter;
json.SerializerSettings.PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.Objects;config.Formatters.Remove(config.Formatters.XmlFormatter);
After this codes were added.the Return XML will be transferred to Json format