C# 如何更改我的Web服务';什么是mime类型?

C# 如何更改我的Web服务';什么是mime类型?,c#,asp.net,json,web-services,web,C#,Asp.net,Json,Web Services,Web,我有一个rest服务实现,如下所示: public string GetMenuItemById(string itemID) { MenuItemsRepository menutemsRepository = new MenuItemsRepository(); string json = menutemsRepository.GetMenuItemById(itemID); ..... } 我想返回JSON字符串,但响应中的内容类型不应该是application/

我有一个rest服务实现,如下所示:

 public string GetMenuItemById(string itemID)
 {
   MenuItemsRepository menutemsRepository = new MenuItemsRepository();
   string json = menutemsRepository.GetMenuItemById(itemID);
   .....
 }
我想返回JSON字符串,但响应中的内容类型不应该是application/JSON,而应该是text/JSON或html/JSON。如何实现这一点?

即使使用[ScriptMethod(ResponseFormat=ResponseFormat.Json)]?