[ https://jira.fiware.org/browse/HELP-20567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fernando Lopez deleted HELP-20567: ---------------------------------- > [fiware-stackoverflow] Conversion error when converting an integer field from mongo to Json format as result in WSO2 Integration Studio > --------------------------------------------------------------------------------------------------------------------------------------- > > Key: HELP-20567 > URL: https://jira.fiware.org/browse/HELP-20567 > Project: Help-Desk > Issue Type: Monitor > Reporter: Backlog Manager > Labels: fiware, wso2, wso2-integration-studio > > Created question in FIWARE Q/A platform on 18-01-2023 at 00:01 > {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/75153461/conversion-error-when-converting-an-integer-field-from-mongo-to-json-format-as-r > +Question:+ > Conversion error when converting an integer field from mongo to Json format as result in WSO2 Integration Studio > +Description:+ > In WSO2 Integration Studio Data Service project, I am extracting data from mongo database using find query. While showing an integer field in json format, I get the following error. > I have a field called 'RoomCount' and an integer type that returns a Mongo query result. I am getting error while converting this field to Json Format as below. When I am pulling string type data its work but integer,double.. doesnt work ! > <query id="MunicipalBuildingDetails" useConfig="FiwareMongoDb"> > <expression>collectionName.find()</expression> > <result outputType="json" escapeNonPrintableChar="true">{ > Result: > { > Data: > [{ > "Col1":"$document.RoomCount" > } > ] > } > }</result> > </query> > Error is; > DS Fault Message: Error occurred when retrieving data. :JSONObject["RoomCount"] not a string. > How can I solve this? -- This message was sent by Atlassian JIRA (v6.4.1#64016)
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy