Questions tagged [xml-to-json]

82 questions
0
votes
1 answer

How to keep square brackets in single array using Logic Apps?

I am parsing an XML document to JSON, and eventhough I have the type array declared in the json schema, if there is just one element in the array it gets transformed into an objet like this. "ListOfCodes":{"Codes":{{"Code":"111"}}} but I need…
cindy
  • 1
  • 1
0
votes
2 answers

Converting xml of any structure to json with nested arrays

I have XML which can be of any structure like below. Therefore there is no POJO class for instantiation. As you can see I have nested arrays (in this case reservations is an array of two reservation and every reservation have simple elements and…
mosiek
  • 131
  • 1
  • 9
0
votes
0 answers

XML to JSON conversion with arrays

I have a requirement to convert xml to json. few elements required an array and for few elements it is not required.The Initial root tag also needs to be remove. Below is my xml.
janardhan d
  • 35
  • 1
  • 6
0
votes
1 answer

How to transform a xml to json for the below sample in wso2 esb

I want to convert the below XML into JSON. Please suggest how to do in wso2 esb and what mediators to be used. Input XML LA - First Name , LA - Middle Name , LA - Last name Sharath Kumar…
0
votes
1 answer

Liquid mapping problem in API-Management Policy

I've encountered a problem regarding mapping values using liquid for a "Soap to Rest" api endpoint in API management policys. My Example looks something like this... The Soap Request should return something like this:
H4p7ic
  • 1,669
  • 2
  • 32
  • 61
0
votes
1 answer

Quick Assistance With Nested Objects

Performing a GET request that returns in XML format. I converted that to JSON as outlined below. I am looking to parse an array and set an array as a env. variable for each specific object in the array. How can I achieve looping through Tuple.Answer…
0
votes
1 answer

I have an xml response in a local .xml file which i need to convert to JSON in React

I am building a simple react app using create-react-app where i need to read data from this xml and display in UI. I have tried almost all the XML converting packages like xml2js, xmltojson stream, xml-js,,xml2json but failed. xml2js i have tried…
Cheroki
  • 11
  • 3
0
votes
0 answers

How do I parse xml response in JSON in GAS/Javascript

I am trying to get data via external API but it comes in XML. I would like to convert it to JSON before using it on another function. Anyone with an idea on how to do this, kindly help. Here is my code. function getData() { var options = { …
Just
  • 437
  • 5
  • 15
0
votes
1 answer

Converting XML to JSON and output to HTML with jQuery

I'm trying to test out an idea I had but using this XML to JSON script: https://github.com/sergeyt/jQuery-xml2json But then take the JSON data and then output that into HTML with jQuery. So far, I've been able to load up the data correctly and I can…
ultraloveninja
  • 1,969
  • 5
  • 27
  • 56
0
votes
0 answers

How to convert empty XML tag with property json:Array="True" in JSON?

I am converting XML file to JSON. Sample XML data: Output JSON: "shifts": [ {} ] Expected output JSON: "shifts": [] Can anyone help me on this?
0
votes
0 answers

How to change JSON value's datatype as per the JSON Schema?

I have a JSON which is converted from xml. (XML to JSON) But the converted JSON file has some datatype issue, which is not matched with the expected JSON schema For ex: expected is accountId: "123" (in Json schema type is mentioned as String) But…
Maharajan
  • 11
  • 5
0
votes
1 answer

Parse the XML to get the Node Value

I get a XML response which is 16 MB data when calling an end point like below
trx
  • 2,077
  • 9
  • 48
  • 97
0
votes
1 answer

node-7z and xml2json conflict

in node.js, I have problem when import both packages (node-7z and xml2json), I have some function that no one calls it ("dummy"), import { extractFull } from 'node-7z' const xml2json = require('xml2json'); function dummy(){ …
larry ckey
  • 141
  • 2
  • 14
0
votes
0 answers

Junit XML to json format in Jroovy with XmlSlurper

I am trying to write a bridge function to convert XML data to the Json format below are the data I have the sample xml file is
VKr
  • 3
  • 4