json « playframework « Java Enterprise Q&A





1. Play Framework renderJSON Issue    stackoverflow.com

I'm new to Play Framework, and having trouble rendering a JSON object.

public static void LoginFail() {

 Object[][] statusArray = {

   {"Status", "401"},
   {"Message", "Unauthorized"},
   ...

2. Customizing JSON serialization in Play    stackoverflow.com

I'm using renderJSON(Object) to return some objects as JSON values, and it's working fine except for one field. Is there an easy way to add in that one field without ...

3. Prevent certain fields from being serialized    stackoverflow.com

In the Play framework i have a few models that have fields which are object references to other models. When i use renderJSON, i don't want those object references to be ...

4. Consuming JSON in play! framework controller    stackoverflow.com

I'm trying to consume a JSON array I created using JavaScript but the array is never bound in my controller Here is the JavaScript code I use to call my controller action

$.post("/produits_ajax",{filterParams:[{name:"milk", ...

5. Best way to use Jackson JsonNodeFactory    stackoverflow.com

Hey guys I'm using Jackson to build a custom json object. I'm wondering if this is the correct way of going about this? It seems to work well(and output ...

6. Json Entity List with Play Framework    stackoverflow.com

I try to run this code but I get a NULL exception. Java Code :

public static void updateData(List<Users> users){
   for(Users u : users){ //Erros
      System.out.println(u.name); ...

7. Playframework renderJSON() array    stackoverflow.com

I'm using renderJSON() method to return an array of objects, with a custom JsonSerializer for the class of each element. The response has the following format:

[{"id":2,"name":"fred"},{...},...]
But I would like to add ...

8. Consuming Json in Play Framework    stackoverflow.com

I try to run this code but I get a Null Exception. Java Code :

public static void updateData(List<Users> users){ 
   for(Users u : users){ //Error 
    ...

9. Can't set the content-type to Json in functional test    stackoverflow.com

I have the following code to make a json request, but it fails:

Response response = POST("/b/profile/","application/json",body);
I also tried this one:
Response response = POST("/b/profile/","application/x-www-form-urlencoded",body);
but the response again had the content-type text/html. Any ...





10. play framework function testing of json response    stackoverflow.com

I have I Controller with a method:

public static void softwares() {
   List<Software> list = new ArrayList<Software>();
   list.add(new Software("soft 1"));
   list.add(new Software("soft 2"));
   list.add(new ...

11. Exclude datamember when using renderJSON with play framework    stackoverflow.com

I need to render objects in JSON and send them to the client but I need to exclude fields like email and password for obvious reasons. I know play uses GSON (by ...

12. How do I create a custom binder for a JSON body?    stackoverflow.com

I am working with the play framework and I would like to create a custom binder for JSON that comes from a POST method. I was trying to do that ...