Utilizing the JSONPEncoderFactory and JSONPBehavior method has allowed me to incorporate JSONP into WCF seamlessly. Everything is set up correctly and my service successfully returns data without any issues.
However, I am faced with the challenge of converting the JSON variable names into lowercase to align with how they are utilized in JavaScript. This task has proven to be quite puzzling for me so far.
Below is an illustration of the output from my service (the elements have been altered for this demonstration)
{"Animals":["dog","cat","mouse"],"Owner":"Greg","Permanent":"y","ID":1,"DaysToStay":"1"}
It seems straightforward, right? I simply want to change "Animals" to "animals", and so forth...
Should I employ a json parser for this, or could it be achieved easily using a regular expression? I would greatly appreciate it if someone could share their approach to accomplishing this task.
Thank you!