DataPower General

Expand all | Collapse all

Badgerfish JSON to XML

  • 1.  Badgerfish JSON to XML

    Posted Thu February 13, 2020 06:05 AM
    I have a situation where well formed badgerfish JSON does not get converted to XML using DP's built in converter method. I would like to understand what is it which is preventing the conversion from badgerfish JSON to XML

    I have attached badgerfish JSON and  the intended XML structure.
    It would be great if someone could analyse the BF json and tell me where exactly is the problem.

    Varun Rao


    BFjson.xml   1K 1 version
    IntendedXML.xml   1K 1 version

  • 2.  RE: Badgerfish JSON to XML

    Posted Thu February 20, 2020 05:35 AM
    I couldn't reproduce the issue you described. I was able to convert your BadgerFish sample to XML without any modifications. Seems like a valid BadgerFish to me. I used the following GatewayScript snippet:
    var converter = require('json-xml-converter');
    let xmlReqBody = converter.toXML('badgerfish', reqBody);

    Hermanni Pernaa