Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSON template

 
Sheetal Rathore
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are right. but any solutions for now?
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic