Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add xml2json func, expandReference parseXML(body) #444

Closed
wants to merge 3 commits into from
Closed

Conversation

mtuchi
Copy link
Collaborator

@mtuchi mtuchi commented Dec 6, 2023

Short Description

Add xml2json function and improve parseXML function

Why ?

The implementation team has ongoing project in partnership with vera team. This project will have an automated workflow that will take data from SunSystem which has a SOAP API to Salesforce. To make the transformation process easy, We need an adaptor function that can be used to convert the xml response to a json object.

Implementation Notes #446

Add xml2json(xmlString, options, callback) function that uses xml2js package. This function will take xml string and convert it to json object.

This PR also contain improvements for parseXML function. The first argument of the parseXML function was not using expandReferences which makes it hard to access data from state in job code.

Review Checklist

  • Does the PR do what it claims to do?
  • Are there any unit tests? Should there be?
  • Is there a changeset associated with this PR? Should there be? Note that
    dev only changes don't need a changeset.

@mtuchi mtuchi changed the title add expandReference in parseXML body argument Add xml2json function Dec 7, 2023
@mtuchi mtuchi changed the title Add xml2json function Add xml2json fun, expandReference parseXML(body) Dec 7, 2023
@mtuchi mtuchi changed the title Add xml2json fun, expandReference parseXML(body) Add xml2json func, expandReference parseXML(body) Dec 7, 2023
@mtuchi
Copy link
Collaborator Author

mtuchi commented Dec 11, 2023

Adding xml2json in http is not advised for the time being since parseXML is already useful enough.

@mtuchi mtuchi closed this Dec 11, 2023
@mtuchi mtuchi deleted the add-xml2js branch December 11, 2023 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant