


yaml-adaptor
This is utility to process and convert YAML to JSON and Dyanmic Objects and JSON and Dynamic Objects to YAML. It is possible convert XML - YAML and YAML XML also.
Installation: ZPM
Open IRIS Namespace with Interoperability Enabled.
Open Terminal and call:
USER>zpm “install yaml-adaptor”
Installation: Docker
Clone/git pull the repo into any local directory
$ git clone https://github.com/yurimarx/yaml-adaptor.git
Open the terminal in this directory and run:
$ docker-compose build
- Run the IRIS container with your project:
$ docker-compose up -d
Features
- Convert from YAML string to JSON string
- Generate YAML file from a JSON file
- Convert from JSON string to YAML string
- Generate JSON file from YAML file
- Load a dynamic object from YAML string or YAML files
- Generate YAML from Dynamic Objects
- Convert from YAML string to XML string
- Generate XML file from YAML file
- Generate YAML file from XML File
- Generate JSON File from XML File (new)
- Generate XML File from JSON File (new)
- Convert JSON to XML and XML to JSON (new)
- Interoperability PEX Business Operation (using File Adapter) to Receive JSON and save as YAML
How to Run the Sample
Debug or run the class dc.yamladapter.Test to see some examples and results. For file operations pay attention to inputs and outputs on samples folder (docker) and /tmp/samples (IPM)
How to Run the Interoperability Business Operation
- Go to Interoperability > Configure > Production EXtensions Components
- Click the button Register New Component and Fill with these values:
2.1. Remote Classname: yamladaptor.JsonToYamlOperation
2.2. Proxy Name: yamladaptor.JsonToYamlOperation
2.3. External Language Server: %Java Server
2.4. Gateway Extra CLASSPATHS: /usr/irissys/bin/yaml-adaptor.jar
- Go to Interoperability > Configure > Production > Click Open and Select dc > yamladapter > YamlProduction
- Start the production
- Put files /tmp/samples and the output on /tmp folder