Forum Academy Marketplace Showcase Pricing Features

XML to json format

Hi Bubblier,

Any one who had encountered an problem with convertion xml to json format? It’s working on postman, when i tried to initialized call in bubble value are there but fields are missing.

Regards,

Robin

1 Like

From the screenshot it looks like the data is json (in Bubble). Have you tried changing data type?

Hi @simon7,

Yes, I tried change it to JSON and see below error. I have followed the documents only 3 format (vCard, CSV, XML) are there.

image

And see if I set the data type to Text and check the capture headers.


In your first post where the call is https://…ef85…
The response is clearly json.

In the postman screenshot and your last screenshot the response is xml.

If each endpoint delivers different response types, you just need to add a connector in api connector so you have one for the xml data response and one for the json data response.
Hope that makes sense :slight_smile:

Otherwise, if you could share the urls that you are trying to call, it will be easier to figure out.

1 Like

Hi @simon7,

I read some of the post here in forum that there is something problem with the data type “XML”. maybe there is but im not so sure.

Please see below the urls.

https://ocrsdkwestus.blob.core.windows.net/files/f03f9fb4-1e73-448f-b67f-292de1833ca9.result?sv=2012-02-12&se=2019-10-29T18%3A00%3A00Z&sr=b&si=downloadResults&sig=rcleBFHVmX6nSlvfcwtjw1GBq8phrsPq%2B1NDPoez%2F6o%3D

Please let me know if will work at your end.

Xml can be more complicated to extract, but often it works if the file is simple (like yours). But that is not the case here. Your first call clearly returns a json - could you share the url you are calling there so we can compare the urls?

Also, what service is it that you are using? The api description will probably show if some parameter is missing in your calls to get the correct response-type.

Hi @simon7,

see below url for my sample project and i just put all the api alreay. i just initiaize manually to see the result.

EDIT: Just found the documentation (https://www.ocrsdk.com/documentation/specifications/status-codes-v2/) and your right, it seems the output can’t be changed, so you’ll have to live with xml. But its still strange why/how the first image shows a json.

Can you somehow reproduce that?

Old post:
If you look at your post request (scanAbbyy), the url ends with “Format=xml”. Try and change that to “Format=json”.
The get request should then get the response in the correct format :wink:

1 Like

Hi @simon7,

In the documents only format “vCard, CSV, and XML” are supported so “Format=json” it will not work and I did already. I don’t know maybe because bubble have a bugs for XML data type and i have read some of the post in this forum with the same issue that I encountered and they advise is to used server side but i don’t know how.

But anyway , thanks for your help and quick response . Much appreciated. :slightly_smiling_face::wink:

Hi. Did you ever find a solution? I’m actually looking for one now to handle xml from Abbyy.

Bit late in responding here but this came up in my search. If you’re looking for a converter, I developed an API that converts dynamic XML feeds to JSON:

https://api.factmaven.com/xml-to-json?xml=http://example.com/feed.xml

All you need to do is enter the URL in a parameter (xml=). This ensures that the most recent XML data is converted to a JSON.

You can read more about it here:

1 Like

Hello @robin.oliamot ,

I’m in the same boat as you. Did you find any workable solution for this issue? I’m working on ABBYY OCR integration into my bubble app and right now I’m facing the same issue in your thread. You can find my bubble forum topic here.

If you have already figured out a way to do this, could you please share it with me? That would be a great help.

Thank you.
Ravi