-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Aleksandar Aytov <[email protected]>
- Loading branch information
1 parent
87e044f
commit 947f30e
Showing
3 changed files
with
489 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
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,71 @@ | ||
# Transform Data | ||
|
||
Table of Contents | ||
|
||
* [Description](#description) | ||
* [Requirements](#requirements) | ||
* [How to use](#how-to-use) | ||
* [Expected result](#expected-result) | ||
|
||
## Description | ||
|
||
The commands attempts to transform data from the source data type to the target data type. | ||
Currently this commands transforming data from and to: | ||
* JSON | ||
* XML | ||
* YAML | ||
* CSV | ||
|
||
## Requirements | ||
|
||
There are no requirements to use this command. | ||
|
||
## How to use | ||
|
||
Enter the required input keys: | ||
* data | ||
* sourceFormat | ||
* targetFormat | ||
|
||
## Expected result | ||
|
||
The expected result is to received the output data in the target format. | ||
|
||
### Examples | ||
|
||
* Transforming XML to JSON | ||
Input: | ||
``` | ||
<xml name="John" age="25">Hello</xml> | ||
``` | ||
Output: | ||
``` | ||
{ | ||
"xml": { | ||
"@name": "John", | ||
"@age": 25, | ||
"$": "Hello" | ||
} | ||
} | ||
``` | ||
|
||
* Transforming JSON to CSV | ||
Input: | ||
``` | ||
[ | ||
{ | ||
"name": "John", | ||
"age": 25 | ||
}, | ||
{ | ||
"name": "Monica", | ||
"age": 23 | ||
} | ||
] | ||
``` | ||
Output: | ||
``` | ||
name,age | ||
John,25 | ||
Monica,23 | ||
``` |
Oops, something went wrong.