Question: before starting let me say that I am new to dojo and this is my first project in dojo:

when I am trying to send json data from rest client (some chrome ext) it working for me,I mean to say that my spring mvc part is working, but when i am trying to send the same json from dojo code I am getting http 400 exception

my dojo code:

```
postCreate : function() {
            this.inherited(arguments);
            var form = dom.byId("contactSubmit");
            on(form, "click", function(evt) {
                var box0 = registry.byId("inputEmail");
                var box1 = registry.byId("inputName");
                var box3 = registry.byId("message");

                alert("values are: " + box0.get("value"));

                jsonData = {"email":"some@gmail.com","inputName":"some name","message":"some msg"};

                request.post("/pool/conta", {
                    data: jsonData,
                    handleAs: "json",
                    headers: {
                         "Content-Type": "application/json;charset=utf-8",
                         "Accept": "application/json"
                    }
                }).then(function(text){
                    alert("values are send"+text);
                });

            });

        }

```

the jason data that I am sending from rest client is which is working:

```
{"email":"some@gmail.com","inputName":"some name","message":"some msg"}

```

my spring mvc method is below:

```
@RequestMapping(value="/conta", method = RequestMethod.POST)
    public @ResponseBody Contact getShopInJSON(@RequestBody Contact contact2) {

        Contact contact = new Contact();
        contact.setEmail("pro@gmail.com");
        contact.setInputName("pro");
        contact.setMessage("msg");

        System.out.println("***********************"+contact2.getEmail());

        return contact;

    }

```

pool is name of application

Answer: 
The json data as passed in post request requires string to be crypted with "\" so that the javascript can handle the double codes as is within string(double quoted string).

Thus, the line
 jsonData = {"email":"some@gmail.com","inputName":"some name","message":"some msg"};

would work if written as below

jsonData = " {\"email\":\"some@gmail.com\",\"inputName\":\"some name\",\"message\":\"some msg\"} " ;
Its working now, I have used toJson from dojo/\_base/json" utility before passing it to request.post