Need your help. I am not able to get json string in jsp after adding in modelAndView. After debugging, I found it's get added in modelAndView instace.
Below is the code snippet:
Controller:
modelAndView.addObject("json-data",jsonhelper.getJSONString(viewData));
JSP
<c:if test="${json-data != null}">
<script type="text/javascript">
window.jsonData =${json-data};
</script>
</c:if>
Here viewData is the object, that I need to get in jsp, but in jsp it's giving 0.