Ok noted, Thanks Anjana and Gimantha! On Thu, Feb 19, 2015 at 3:16 PM, Gimantha Bandara <[email protected]> wrote:
> Hi Thusitha, > > Analytics REST APIs dont support custom formatting for responses. > > > On Thu, Feb 12, 2015 at 5:19 PM, Thusitha Kalugamage <[email protected]> > wrote: > >> Hi All, >> >> I need to work on multiple types of JSON strings derived from BAM's >> response. >> currently it will return something like this sample. >> >> { >> id: "00000000000000.00000000000000" >> tenantId: -0000 >> tableName: "testTable" >> timestamp: 1420216491791 >> values: { >> payload_itemNo: "0001", >> payload_itemName: "testname", >> payload_price: 3000, >> payload_timestamp: 1420216491791, >> payload_qty: 1 >> Version: "1.0.0" >> } >> } >> >> But I want to have transformed strings like these - depending on the use >> case, >> >> { >> "itemNo": "0001", >> "itemName": "testname", >> "price": 3000, >> "timestamp": 1420216491791, >> "qty": 1 >> } >> >> and >> >> { >> "type": "FeatureCollection", >> "features": [ >> { >> "geometry": { >> "type": "Point", >> "coordinates": [ >> 0, >> 0 >> ] >> }, >> "type": "Feature", >> "properties": { >> "layer": "location", >> "popupContent": "pop 1", >> "intensity": 10, >> "pointColor": "#33ffff", >> "pointOpacity": "0.6", >> "itemNo": "0001", >> "itemName": "testname", >> "price": 3000, >> "timestamp": 1420216491791, >> "qty": 1 >> }, >> "id": 1 >> } >> ] >> } >> >> Is there a way to achieve this at the BAM's end? (I'm >> using wso2bam-3.0.0-SNAPSHOT) >> >> Can't we send a template of which we want our response to be formatted as? >> Transforming JSON multiple times is a overheard to clients end, any >> suggestions on this? >> >> Thanks Heaps! >> Regards, >> >> -- >> Thusitha Kalugamage >> *Software Engineer* >> Mobile : +94 (0) 774 074370 >> Tel : +94 (0) 112 145 345 >> [email protected] >> > > > > -- > Gimantha Bandara > Software Engineer > WSO2. Inc : http://wso2.com > Mobile : +94714961919 > -- Thusitha Kalugamage *Software Engineer* Mobile : +94 (0) 774 074370 Tel : +94 (0) 112 145 345 [email protected]
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
