ASP.NET JSON Web Service Response format

前端 未结 4 1634
没有蜡笔的小新
没有蜡笔的小新 2020-12-11 17:37

I have written one simple web service which get product list in JSONText which is string object

Web Service code is below

using System;
using Syste         


        
4条回答
  •  庸人自扰
    2020-12-11 18:26

    Actually, if you just remove the

    [ScriptMethod(ResponseFormat = ResponseFormat.Json)] 
    

    from the method, and you return the jsonString that you serialized using the JavaScriptSerializer you will get exactelly the output that you were looking for.

提交回复
热议问题