Category Archives: json

Getting Spring MVC validation messages from a JSON service

I had used Spring MVC with JSR-303/349 validations with Spring MVC forms. Those follow the normal pattern that we are all used to. This was my first time writing a RESTful service with Spring MVC that needed to return validation … Continue reading

Posted in Java, json, Spring | 2 Comments

Adding an attribute to a wrapper in JAXB

I have a list in an object. I need to output this list in XML. Normally this would be accomplished by the following: This produces the following output This is great, until I have the need to add an attribute … Continue reading

Posted in Java, JAXB, json | Tagged , , , | 2 Comments

Spring 3 MVC with JSON via Jackson 2.0

Spring 3.1.2 adds support for automatic conversion to JSON via Jackson 2.x. There isn’t much that you need to do to make it work, with on caveat. You need to be using at least Spring 3.1.2 to have Jackson 2.x … Continue reading

Posted in Java, json, Spring | 14 Comments

Jquery form validation

It has been a while since I wrote a form. I kept posting data even though the validation fired and was not valid. I forgot that you have to check for a valid form. I also learned that you can … Continue reading

Posted in HTML, javascript, JQuery, json | Tagged , , , , , | Leave a comment