hello. im using the latest version of outsystem as this post is written, and using win 10. also i'm using mongodb as external database. and i'm using MongoDBDemo.oml from https://www.outsystems.com/forge/component-overview/1904/mongodb . here step to reproduce error:

1. have your json already with int64 type from mongo

2. start the outsystem with debug mode, take breakpoint at JSON deserialize method. here's the json from mongodb shown in outsystem:

3. run to next step and then error appear

4. the error will also shown in web too

so how do i solve this problem?

many thanks

The JSON deserializer in OutSystems does not recognize the NumberLong object that MongoDB BSON uses.

There are two ways to go about the problem:

1.  Try to get your JSON from MongoDB in regular JSON format.  The OutSystems JSON Deserializer can handle long ints without the need for some special object.  This method is unlikely though since your JSON is coming from the MongoDBLibX extension and it doesn't appear it knows how to force strict JSON.

2.  The second way would be use an extension that knows how to deserialize the BSON properly.  I see there's a newer component on the forge that might work. https://www.outsystems.com/forge/component-overview/7548/bsontoolkt-xif.  Alternatively you could create your own extension to expose an action that will convert BSON to JSON using C#.  This stack overflow article has some ideas on how to convert BSON to JSON: https://stackoverflow.com/questions/27132968/convert-mongodb-bsondocument-to-valid-json-in-c-sharp

Hopefully that helps.