aspose file tools*
The moose likes Other Open Source Projects and the fly likes JSON template Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "JSON template" Watch "JSON template" New topic
Author

JSON template

Sheetal Rathore
Greenhorn

Joined: Jul 22, 2010
Posts: 14
My application generates JSON depending on various business cases. and this JSON is used to render UI.

final JSON is like.

body:{
centerPanel:{
div1:{
table:{
noOfColumns: 2
row:{
column1:{
Label: "My label1"
input:{ type:checkbox, class:inputClass
}
}
column2:{
Label: "My label2"
input:{ type:inputbox , class:inputClass }
}
}
}
}
div2:{
table:{
noOfColumns: 2
row:{
column1:{
Label: "My label1"
input:{ type:checkbox, class:inputClass
}
}
column2:{
Label: "My label2"
input:{ type:inputbox , class:inputClass }
}
}
}
}
}
HeaderPanel:{....}
footerPanel:{....}
}
}

Now our client want to make one section customizable using some kind of template. Restof the JSON will be generated as its done now.
Please suggest if there are ready made tools for doing it.

One such lib I know is JSON tag-lib. but I cannot use JSP as our JSON creation is done in business model.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18887
    
    8

sailee Chatarjee wrote:Now our client want to make one section customizable using some kind of template. Restof the JSON will be generated as its done now.

One such lib I know is JSON tag-lib. but I cannot use JSP as our JSON creation is done in business model.


Then this would be a question about your business model, wouldn't it? You want to modify the creation of the JSON, and it's your business model which is creating the JSON.
Sheetal Rathore
Greenhorn

Joined: Jul 22, 2010
Posts: 14
you are right. but any solutions for now?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18887
    
    8

It really isn't worth answering that question, because anything anybody says is going to get the response "But my business model can't be changed to support that". No, it's up to you now to either come up with a solution or a question.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSON template