So when the Ajax call returns a JSON reply, I do :

```
oData = JSON.parse(sReply);

```

where

```
var oData = new cData();

function cData() {
    this.Email = "";
    this.Name = "";
    this.test = function () {
        alert("lol");
    }
}

```

The problem is, the JSON string only contains the email and the name variables, so when the oData = JSON.parse(sReply) happens, the function test gets overwritten and when I try to call the function it does not exist. Is there a way to avoid this? I may have many functions in there and other variables which I don't want to transmit through JSON.