On Wed, May 2, 2012 at 1:33 PM, Nuwan Bandara <[email protected]> wrote:
> result is an array of json objects ? yes > Cannot exactly tell the issue from the code you have sent. how did you > create the array. it is a result from a db query. > There is a know issue in json stringyfy and parse [1], but am not sure if > thats the case for your scenario. > > [1] https://wso2.org/jira/browse/JAGGERY-205 > I think it's different. This is a valid json object. > > > On Wed, May 2, 2012 at 1:10 PM, Tharindu Mathew <[email protected]> wrote: > >> Hi Jag devs, >> >> Initial investigation reveals that this is something to do with how >> reflections are handled when using Rhino, probably in toString() for a json >> element. >> >> Is there something wrong with the code? or is this expected? >> >> Code: >> >> print (result); >> for (var i = 0; i < result.length; i++) { >> print("The " + i + "th result is : " + result[i]); >> } >> >> Output: >> [{"PROD_NAME" : "Sugar", "QUANTITY_SOLD" : "3760", "TOTAL_AMOUNT" : >> "34800.0", "PROD_ID" : "55"}, {"PROD_NAME" : "Milk", "QUANTITY_SOLD" : >> "563", "TOTAL_AMOUNT" : "24500.0", "PROD_ID" : "124"}, {"PROD_NAME" : >> "Bread", "QUANTITY_SOLD" : "5604", "TOTAL_AMOUNT" : "124900.0", "PROD_ID" : >> "235"}, {"PROD_NAME" : "Butter", "QUANTITY_SOLD" : "320", "TOTAL_AMOUNT" : >> "16900.0", "PROD_ID" : "346"}] >> >> Cannot find default value for object. at line #11 >> >> -- >> Regards, >> >> Tharindu >> >> blog: http://mackiemathew.com/ >> M: +94777759908 >> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > *Thanks & Regards, > > Nuwan Bandara > Associate Technical Lead & Member, MC, Development Technologies > WSO2 Inc. - lean . enterprise . middleware | http://wso2.com > blog : http://nuwanbando.com; email: [email protected]; phone: +94 11 763 > 9629 > * > <http://www.nuwanbando.com/> > -- Regards, Tharindu blog: http://mackiemathew.com/ M: +94777759908
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
