Websphere Commerce provides a jsp tag to make it simple to generate a JSON object. For example, a product JSON might have to be created depending on the business requirements.
The details of the jsp tag is given below
<wcf:json object="${productJSON}"/>
where productJSON is an object (generally a Map) which gets converted to a JSON object.
Map contains key value pairs which are translated to JSOn as below
{
Map {
color: red
price:20
}
}
Does this work for plain POJO's too?
ReplyDeleteif the values have "&" they are converted to & how to avid this ?
ReplyDelete