This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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: 21322
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: 21322
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