So the data is like a RequestParam, not a RequestBody.
I am able to generate a Java domain object when the object has all those fields, but for registration like above, I don't have them fill out all the fields in the Java domain object, so when the serverside receives it, It doesn't know what to do.
I also tried some code I found to make sure the string would be json, but it still looks exactly like above
Basically, I have a serverside controller using Spring MVC, and it is simple to convert JSON to Java domain object where you annotate the parameter with @RequestBody, and since Jackson jar is in my classpath, it would automatically convert the json in the body to my domain object.
While not in the body I am able to have Spring MVC automatically convert to one of my domain object because all the params are set to all the properties in the domain object. But for others where I send partial data compared to what the domain object stores, I get failure to even call the method.
Basically, my Spring MVC Controllers are just all REST apis, and that is what I want. Since I am making this a single page web app.
Thanks again for all your help Bear. Next beer when we see each other again is on me.
Sweet, I found I can put @ModelAttribute on my parameter in my controller and it will automatically take the form post data and for each field find a field in my Domain object with matching name and populate it.
So after weeks, I finally got my registration to post the data to my Controller, and my controller saving it to my Neo4j Graph database. Then did a get to get all users and I see my new user in there.
Thanks again. I keep forgetting that the browsers don't really support REST in forms to allow PUTs or DELETES.
See my main goal is after first loading the index page, everything is now down to the browser and all the rest of the communication is passing data only, no html anymore for the single page app to work.