I'm using the JSONPEncoderFactory,JSONPBehavior solution to enable JSONP in WCF. That's all fine, it's all set up and working well, my service returns the data correctly, no problems there.
However, I need to be able to force the JSON variable names into lowercase due to the way they are being used in JS, and this is something I haven't been able to figure out as yet.
Here is an example of my service output (the variable names and values have been changed to benign elements for this example)
{"Animals":["dog","cat","mouse"],"Owner":"Greg","Permanent":"y","ID":1,"DaysToStay":"1"}
Pretty simple right? I want the "Animals" to be "animals", and so on...
Do I need to use a json parser for this, or is it easy enough just to use a regular expression? I'd be grateful if someone could let me know how they've done this before.
Thanks!