-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create xmljsonconverter.md * Update xmljsonconverter.md * Update xmljsonconverter.md * Update xmljsonconverter.md * Update xmljsonconverter.md * Update xmljsonconverter.md * Add files via upload * Delete la..JPG * Add files via upload * Update xmljsonconverter.md
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
# Json/Xml Converter | ||
|
||
## Introduction | ||
|
||
This framework component can be used to transform either XML to JSON or JSON to XML. The following functions will be exposed by this components: | ||
|
||
- JsonToXml | ||
- XmlToJson | ||
|
||
### Parameters | ||
|
||
|Name|Required|Description| | ||
|--- |--- |--- | | ||
|Content|Yes|A base64 string with either xml or json| | ||
|Context|No|A dictionary of key,object collection| | ||
|ConfigName|Yes|The name of the config which wil be used during the transform| | ||
|XPath|No|Used to focus on part of the content/result| | ||
|JPath|No|Used to focus on part of the content/result| | ||
|
||
### Sample Request Schema | ||
|
||
{ | ||
"configName":"IDD038-inbound.xsl", | ||
"content": "eyJFbnZlbG9wZSI6IHsiU2FsZXNPcmRlckluIjp7ICAgICAgICAg...." | ||
"context": {"x-conversationId": "29500405-d7cf-4877-a72b-a3288cff9dc0"}, | ||
"xpath": "", | ||
"jpath" "$.Envelope" | ||
} | ||
|
||
### Config | ||
|
||
The Config file should be an XSLT file which will handle the transformation. This should be uploaded to storage to the xmltojsonconfigstore blob container which is automatically created on Startup of the application. Please note that the above functions execute the conversion/transform steps in the following order: | ||
|
||
**JsonToXml:** | ||
* The JPath is executed **before** the convert | ||
* Json is converted to XML | ||
* The XSLT Transform is executed after the JSON is converted to XML | ||
* The XPath is executed **after** the Transform | ||
|
||
**XmlToJson:** | ||
* The XPath is executed **before** the Transform | ||
* The XSLT is executed before the XML is converted to JSON | ||
* XML is converted to JSON | ||
* The JPath is executed **after** the convert | ||
|
||
![xmljsonconverter](../../images/xmljsonconv.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.