JSON 2 « Development « Spring Q&A





1. Serializing JSON from within another view technology    forum.springsource.org

Spring 3.0 I am using velocity as my view technology and from a velocity template, I want to be able to locate the bean that is responsible for serialization and serialize ...

2. JSON Command object validation    forum.springsource.org

I am using Keith Donald's "Ajax simplifications in Spring" example published on Springsource's team blog (http://blog.springsource.com/2010/01...in-spring-3-0/). Has anyone tried to type invalid format for any of the form fields (let say ...

3. Problem with Spring and RestFull (JSON Request and JSON Response)    forum.springsource.org

Problem with Spring and RestFull (JSON Request and JSON Response) Hi please help me out. I'm facing the problem with response content type .. The Response Content type always coming with ...

4. Extend @RequestBody to Extract JSON Objects    forum.springsource.org

Extend @RequestBody to Extract JSON Objects I found that I have a lot of cases where I want to get the request body (using @RequestBody), which is JSON encoded, and turn ...

5. Remove class name in JSON response    forum.springsource.org

Remove class name in JSON response Hi guys. I'm developing a restful server with Spring and i can't figure out how to remove the root element which is the class name. ...

6. Dynamic DOJO Tree with JSon    forum.springsource.org

Hello, we have created a menu using DOJO and JSON like: Code:

Now I would like to add a parameter to the JSON Store, like Code:

7. Localized binding errors and json    forum.springsource.org

Hi, When I have a Double price field and the user enters a non-empty string 'blablabla', you get a resulting typeMismatch FieldError. I put these errors in a json object for ...

8. JSON output using @ResponseBody    forum.springsource.org

JSON output using @ResponseBody Hi, I have a controller method called getAlbums() which is actually called via Ajax. public @ResponseBody Collection getAlbums(HttpServletRequest request,@RequestParam int start,@RequestParam int limit) { Collection albums = ...

9. spring json libraries    forum.springsource.org

Hello... I want to use jquery anad ajax in my current spring mvc project.... I came accross various json libraries supporting spring like spring json, flexjson, dwr, json-lib.. i wish to ...





10. jqgrid json object array    forum.springsource.org

jqgrid json object array Hello... I have a jqgrid where in I am returning a list of objects from the controller... I have used the List collection interface of java.util package.... ...

11. ow to deal with jSON object wrapper in POST    forum.springsource.org

ow to deal with jSON object wrapper in POST Hello, I'm using Spring MVC 3.0.3 on backend and Ext JS on frontend. When creating a new record in grid, Ext send ...

12. JSON Jackson question ...    forum.springsource.org

Found a way myself -> For succinct JSON payloads with no wasteful name fields for passing logical objects... this wont work [{"cat",3},{"dog",5}] but [["cat",3],["dog",5]] does !

13. @DateTimeFormat and JSON    forum.springsource.org

@DateTimeFormat and JSON Hi I try to format a json output with the @DateTimeFormat annotation. Here my simple test controller: Code: @Controller public class TestController { @RequestMapping("/doSomething") @ResponseBody public User doSomething() ...

14. Using @ResponseBody to get JSON??    forum.springsource.org

Using @ResponseBody to get JSON?? Hi, What might be a problem?? Seems I missed some configuration, but I got error Code: HTTP Status 406 - The resource identified by this request ...

15. Problem with JSON Encoding    forum.springsource.org

Hello, I have a problem with Spring MVC and JSON encoding. I'am using "org.springframework.web.servlet.view.json.Mapping JacksonJsonView" to create a JSON model for AJAX requests. Code: @RequestMapping(value = "/config.json") public ModelAndView jsonConfig() { ...

16. Get "undefined" error when using spring 3 + json    forum.springsource.org

Sep 20th, 2010, 04:57 AM #1 MingPeng View Profile View Forum Posts Private Message Junior Member Join Date Dec 2005 Posts 4 Get "undefined" error when using spring 3 + json ...





17. xml DOM to json    forum.springsource.org

I have written a Restful service in spring that reaturns a XML DOM. I am looking for a way to convert the xml DOM to JSON. Is there a recommended approach ...

18. 1.1.0M3 json support does not seem to work for finders    forum.springsource.org

1.1.0M3 json support does not seem to work for finders Hi, first let me congratulate you all on what is an impressive developer tool I'm using the 1.1.0M3 version of Spring ...

19. json serialization in 1.1.0.M3 - separate use case?    forum.springsource.org

json serialization in 1.1.0.M3 - separate use case? Hi Roo team, We are using Roo outside the traditional web environment. We like a lot the code generation via aspects. So, we ...

20. Serve JSON "as is", without the use of a MessageConverter    forum.springsource.org

Serve JSON "as is", without the use of a MessageConverter I have a simple stub web service with which users can PUT a blob of JSON content which is persisted somewhere, ...

21. submit as form, response as JSON or XML    forum.springsource.org

Hello, I am trying to use the RESTful API, and I know how to configure Spring to fully use JSON or XML, but I don't know how to set it up ...

22. Automatic JSON support    forum.springsource.org

When I run the clinics.roo script for Spring Roo 1.1.0.RC1 I'm not getting the json result set like I was for M3. Was this feature not added to RC1? curl -v ...

23. How to render a string which is in JSON format to a JSP    forum.springsource.org

I'm trying to implement type ahead using Spring2.0.6. I'm the required data from the database and converting it into a String which is in JSON format. I just need a solution ...

24. 406 error while trying JSON    forum.springsource.org

406 error while trying JSON I have been trying to implement JSON interaction in Spring 3MVC.. Then I found this article of Keith Donald(Ajax Simplifications in Spring 3.0) I found it ...

25. Upgraded to 1.1.0.RELEASE, and it deletes my *_Json.aj files?    forum.springsource.org

I just upgraded from Roo 1.1.0.M3 to 1.1.0.RELEASE. As soon as I re-ran the roo console, it deletes the _Roo_Json.aj files, so now my entity beans have lost their toJson() methods? ...

26. Ajax json Jackson    forum.springsource.org

Hi, You can use ContentNegotiatingViewResolver as described here: http://static.springsource.org/sprin...epresentations But I highly recommend switching to - it reduces the amount of configuration dramatically and you can still override the behavior ...

27. Incorrect Accept in JSON create methods    forum.springsource.org

@RequestMapping(method = RequestMethod.POST, headers = "Accept=application/json") @ResponseBody public String MyThingController.createFromJson(@RequestBody final String json) { MyThing myThing = MyThing.fromJsonToMyThing(json); myThing.persist(); return myThing.toJson(); }

28. How to get a JSON object from a application/json content type    forum.springsource.org

How to get a JSON object from a application/json content type Hi, I am a newbee in Spring. I use Spring MVC in my current project. I need to convert a ...

29. Strange JSON result    forum.springsource.org

Strange JSON result Hi, I am trying to enable json in my Roo test app and I finally managed to get it working in that I can append .json to the ...

30. Handling Errors Represented as JSON    forum.springsource.org

Handling Errors Represented as JSON I am using Spring Integration as an abstraction to a target REST service that returns JSON in all cases--a "document" object when things go well and ...