Basically I am fighting an uphill battle to format the data I am returning in a way that the calling party wants it.
I have found that I can "response.write" the data "perfectly" but the WebMethod insists on returning something... even if it's a null.
<System.Web.Services.WebMethod> _
Public Shared Function api_method(ByVal key1 As String) As String
Dim test As Object = getReturnData(key1)
Dim json As String = New JavaScriptSerializer().Serialize(test)
json = Replace(json, """amount"":""", """amount"":")
json = Replace(json, """,""currency", ",""currency")
HttpContext.Current.Response.BufferOutput = True
HttpContext.Current.Response.ContentType = "application/json"
HttpContext.Current.Response.Write(json)
HttpContext.Current.Response.Flush()
End Function
Any way to suppress that null?