Tried using gson API for java-to-json. And works fine.
Posting both the resulting jsons.
Resulting JSON using json-lib (gives unterminated string literal error)
var json = {"addToSessionFlag":false,"addToShoppingCart":false,"allMessageCodes":"IXMANAGER__PARSING_STATUS#","beanKey":"","cacheFlag":false,"callBackData":{"IXMANAGER_PARSER_ERROR_LIST":[{"cellData":"
34295","columnHeader":"","columnNumber":8,"errorMessage":"Error : Invalid Zip Code","rowNumber":1},{"cellData":"","columnHeader":"","columnNumber":9,"errorMessage":"Error : Invalid Contact Person","rowNumber":1},{"cellData":"+90-(0)212-4113838
","columnHeader":"","columnNumber":10,"errorMessage":"Error : Invalid Phone Numbers","rowNumber":1},{"cellData":"[email protected]","columnHeader":"","columnNumber":12,"errorMessage":"Error : Invalid Email Address","rowNumber":1},{"cellData":"41.000792,28.802633","columnHeader":"","columnNumber":14,"errorMessage":"Error : Invalid Website","rowNumber":1},{"cellData":"15:00 p.m","columnHeader":"","columnNumber":19,"errorMessage":"Error : Invalid Hotel Check-In/Check-Out Time","rowNumber":1},{"cellData":"12:00 p.m","columnHeader":"","columnNumber":20,"errorMessage":"Error : Invalid Hotel Check-In/Check-Out Time","rowNumber":1}]}};
var test = eval(json);
alert(test);
Resulting JSON using gson (succesful eval. works!)
var json = {"keyId":0,"sSuccessType":"||ERR||","sSuccessMessage":"Parsing Failed\u003cBR /\u003e","_bAddToSessionFlag":false,"bCacheFlag":false,"success":false,"callBackData":{"IXMANAGER_PARSER_ERROR_LIST":[{"_iRowNumber":1,"_iColumnNumber":8,"_sCellData":"\u202834295","_sErrorMessage":"Error : Invalid Zip Code"},{"_iRowNumber":1,"_iColumnNumber":9,"_sErrorMessage":"Error : Invalid Contact Person"},{"_iRowNumber":2,"_iColumnNumber":9,"_sErrorMessage":"Error : Invalid Contact Person"},{"_iRowNumber":1,"_iColumnNumber":10,"_sCellData":"+90-(0)212-4113838\u2028","_sErrorMessage":"Error : Invalid Phone Numbers"},{"_iRowNumber":1,"_iColumnNumber":12,"_sCellData":"[email protected]","_sErrorMessage":"Error : Invalid Email Address"},{"_iRowNumber":2,"_iColumnNumber":12,"_sCellData":"[email protected]","_sErrorMessage":"Error : Invalid Email Address"},{"_iRowNumber":1,"_iColumnNumber":14,"_sCellData":"41.000792,28.802633","_sErrorMessage":"Error : Invalid Website"},{"_iRowNumber":2,"_iColumnNumber":14,"_sCellData":"40.971911,28.871362","_sErrorMessage":"Error : Invalid Website"},{"_iRowNumber":1,"_iColumnNumber":19,"_sCellData":"15:00 p.m","_sErrorMessage":"Error : Invalid Hotel Check-In/Check-Out Time"},{"_iRowNumber":2,"_iColumnNumber":19,"_sCellData":"14:00 p.m","_sErrorMessage":"Error : Invalid Hotel Check-In/Check-Out Time"},{"_iRowNumber":1,"_iColumnNumber":20,"_sCellData":"12:00 p.m","_sErrorMessage":"Error : Invalid Hotel Check-In/Check-Out Time"},{"_iRowNumber":2,"_iColumnNumber":20,"_sCellData":"12:00 p.m","_sErrorMessage":"Error : Invalid Hotel Check-In/Check-Out Time"}]}};
var test = eval(json);
alert(test);
Although this is not the complete solution to my problem as I think gson uses class variables directly instead of getters at the time of json serialization.
Any thoughts about it?