Microsoft reports that Enumeration member values are treated as numbers in JSON
.
We're building the WebMethod output into a table by hand, so converting the member number into it's name on the client is possible, but it smells and would be less robust than converting it on the server, using Enum.GetName
. For example, if we add or change the enumeration it would mean changing our Javascript.
Is there an (easy) way to do this in the WebMethod? The object serializes correctly, and was working when we were using XML to transport the result.