Hello @jigar.bhojak​Â
Unfortunately, there does not appear to be a transformer that natively supports converting BSON to JSON in FME.
If you are comfortable using Python, it is possible to install the bson Python library following the instructions here. This should allow you to convert BSON into JSON strings using the PythonCaller. I have attached an example workspace demonstrating this workflow and I hope it helps.
Hello @jigar.bhojak​Â
Unfortunately, there does not appear to be a transformer that natively supports converting BSON to JSON in FME.
If you are comfortable using Python, it is possible to install the bson Python library following the instructions here. This should allow you to convert BSON into JSON strings using the PythonCaller. I have attached an example workspace demonstrating this workflow and I hope it helps.
Thank you, Debbie,
I tried the transformer you have attached but I think our data is acting like special privilege kid and not responding to it 😆
Will have to try something else :(
thank you for your help anyway :)
Thank you, Debbie,
I tried the transformer you have attached but I think our data is acting like special privilege kid and not responding to it Â
Will have to try something else :(
thank you for your help anyway :)
Hey follow the instructions for installing bson here: Installing Python Packages to FME Desktop (safe.com)
I can recommend using the following command on windows:
fme.exe python -m pip install bson -t %USERPROFILE%\Documents\FME\Plugins\Python\Python39
Now open the pythoncaller in debbies answer, go to line 15 and make the following change:
json_dict = bson.loads(feature.getAttribute("_response_body"))
connect this transformer to the output of httpcaller.
Â
if you get an error: Python Exception <ModuleNotFoundError>: No module named 'bson'
Â
you can at line 3 addÂ
import sys
sys.path = Âr'C:\Users\<username>\Documents\FME\Plugins\Python\Python39'] + sys.path
Â
Change <username> with your username.
Â
Hope this helps.