Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel

Table of Contents
maxLevel3
stylenone


NAME

DataConv

Data Conv is used to convert a file format among JSON, XML, CSV.


Section

DataConv is used to convert a file format among JSON, XML, CSV.

NAME

DataConv is used to convert a file format among JSON, XML, CSV.

SYNOPSYS

SYNOPSYS


Data Conv needs next parameters or options.

Parameter


Operation

  • Supports CSV-to-TSV, CSV-to-_SV, JSON-to-XML, XML-to-JSON
  • csv2tsv: converts CSV to TSV (Tab-separated values) format
  • csv2_sv: converts CSV to a character separated values which you specify as 'Target separator'
  • json2xml / xml2json: converts JSON to XML format or vice versa

Source File

  • A source file to be converted

Target File

  • Target file to save the converted file

Options


Target separator

  • A single character to be used as separator

File Encoding

  • File encoding type of source file.
  • Default: utf8
※ NOTE


Note

In case of UTF8, the encoding of a source file must

be 

be UTF-8 without BOM (Byte Order Mark).

 

Windows Notepad

 saves

saves files as ANSI by default. Even though you select UTF-8 in Notepad, it saves

as 

as UTF-8 with BOM. It's a good idea to use the 3rd party editor that

supports 

supports UTF-8 without BOM

 

, such like Notepad++, Sublime Text.




Examples

EX1. CSV-to-TSV

Paramaters

Parameters\OptionsValues
Operationcsv2tsv
Source FileC:\1.MyUtils\TestRun\TestRun\csv_sample.csv
Target FileC:\1.MyUtils\TestRun\TestResult\csv2tsv.txt

Results

(1) source file

Code Block
id,first_name,last_name,email
1,Jillene,Ashness,jashness0@cisco.com
2,Briney,Lightbourne,blightbourne1@slate.com
3,Letti,Cayzer,lcayzer2@utexas.edu
4,Abramo,Gerrelts,agerrelts3@people.com.cn
5,Kaitlynn,Sussex,ksussex4@wsj.com


(2) results

Code Block
id	first_name	last_name	email
1	Jillene	Ashness	jashness0@cisco.com
2	Briney	Lightbourne	blightbourne1@slate.com
3	Letti	Cayzer	lcayzer2@utexas.edu
4	Abramo	Gerrelts	agerrelts3@people.com.cn
5	Kaitlynn	Sussex	ksussex4@wsj.com

EX2. CSV-to-_SV

Paramaters

Parameters

Parameters\OptionsValues
Operationcsv2_sv
Source FileC:\1.MyUtils\TestRun\TestRun\csv_sample.csv
Target FileC:\1.MyUtils\TestRun\TestResult\csv2_sv.txt
Target separator*

Results

(1) source file

Code Block
languagebash
themeRDark
id,first_name,last_name,email
1,Jillene,Ashness,jashness0@cisco.com
2,Briney,Lightbourne,blightbourne1@slate.com
3,Letti,Cayzer,lcayzer2@utexas.edu
4,Abramo,Gerrelts,agerrelts3@people.com.cn
5,Kaitlynn,Sussex,ksussex4@wsj.com


(2) results

Code Block
languagebash
themeRDark
id*first_name*last_name*email
1*Jillene*Ashness*jashness0@cisco.com
2*Briney*Lightbourne*blightbourne1@slate.com
3*Letti*Cayzer*lcayzer2@utexas.edu
4*Abramo*Gerrelts*agerrelts3@people.com.cn
5*Kaitlynn*Sussex*ksussex4@wsj.com



EX3. JSON-to-XML

Paramaters

Parameters

Parameters\OptionsValues
Operationjson2xml
Source FileC:\1.MyUtils\TestRun\TestRun\json_sample.csv
Target FileC:\1.MyUtils\TestRun\TestResult\results.xml

Results

(1) source file

Code Block
languagejs
themeRDark
{
    "glossary": {
        "title": "example glossary",
		"GlossDiv": {
            "title": "S",
			"GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
					"SortAs": "SGML",
					"GlossTerm": "Standard Generalized Markup Language",
					"Acronym": "SGML",
					"Abbrev": "ISO 8879:1986",
					"GlossDef": {
                        "para": "A meta-markup language, used to create markup languages such as DocBook.",
						"GlossSeeAlso": ["GML", "XML"]
                    },
					"GlossSee": "markup"
                }
            }
        }
    }
}


(2) results

Code Block
languagexml
themeRDark
linenumberstrue
<?xml version="1.0" encoding="utf-8"?>
<glossary>
<glossary>
	
<title>example glossary</title> <GlossDiv>
<title>example glossary</title>
	<GlossDiv>
		
<title>S</title>
<title>S</title>
		
<GlossList>
<GlossList>
			
<GlossEntry>
<GlossEntry>
				
<ID>SGML</ID>
<ID>SGML</ID>
				
<SortAs>SGML</SortAs>
<SortAs>SGML</SortAs>
				
<GlossTerm>Standard
<GlossTerm>Standard Generalized Markup 
Language<
Language</
GlossTerm>
GlossTerm>
				
<Acronym>SGML</Acronym>
<Acronym>SGML</Acronym>
				
<Abbrev>ISO
<Abbrev>ISO 8879:
1986<
1986</
Abbrev>
Abbrev>
				
<GlossDef>
<GlossDef>
					
<para>A
<para>A meta-markup language, used to create markup languages such as DocBook.</
para>
para>
					
<GlossSeeAlso>GML</GlossSeeAlso>
<GlossSeeAlso>GML</GlossSeeAlso>
					
<GlossSeeAlso>XML</GlossSeeAlso>
<GlossSeeAlso>XML</GlossSeeAlso>
				</
GlossDef>
GlossDef>
				
<GlossSee>markup</GlossSee>
<GlossSee>markup</GlossSee>
			</
GlossEntry>
GlossEntry>
		</
GlossList>
GlossList>
	</
GlossDiv>
GlossDiv>
</
glossary>
glossary>



EX4. XML-to-JSON

Paramaters

Parameters\OptionsValues
Operationxml2json
Source FileC:\1.MyUtils\TestRun\TestRun\xml_sample.csv
Target FileC:\1.MyUtils\TestRun\TestResult\results.json

Results

(1) source

Code Block
languagexml
themeRDark
linenumberstrue
<?xml version="1.0" encoding="utf-8"?>
<glossary>
<glossary>
	
<title>example glossary</title> <GlossDiv>
<title>example glossary</title>
	<GlossDiv>
		
<title>S</title>
<title>S</title>
		
<GlossList>
<GlossList>
			
<GlossEntry>
<GlossEntry>
				
<ID>SGML</ID>
<ID>SGML</ID>
				
<SortAs>SGML</SortAs>
<SortAs>SGML</SortAs>
				
<GlossTerm>Standard
<GlossTerm>Standard Generalized Markup 
Language<
Language</
GlossTerm>
GlossTerm>
				
<Acronym>SGML</Acronym>
<Acronym>SGML</Acronym>
				
<Abbrev>ISO
<Abbrev>ISO 8879:
1986<
1986</
Abbrev>
Abbrev>
				
<GlossDef>
<GlossDef>
					
<para>A
<para>A meta-markup language, used to create markup languages such as DocBook.</
para>
para>
					
<GlossSeeAlso>GML</GlossSeeAlso>
<GlossSeeAlso>GML</GlossSeeAlso>
					
<GlossSeeAlso>XML</GlossSeeAlso>
<GlossSeeAlso>XML</GlossSeeAlso>
				</
GlossDef>
GlossDef>
				
<GlossSee>markup</GlossSee>
<GlossSee>markup</GlossSee>
			</
GlossEntry>
GlossEntry>
		</
GlossList>
GlossList>
	</
GlossDiv>
GlossDiv>
</
glossary>
glossary>


(2) results

Code Block
languagejs
themeRDark
linenumberstrue
{
    "glossary": {
        "title": "example glossary",
        "GlossDiv": {
            "title": "S",
            "GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
                    "SortAs": "SGML",
                    "GlossTerm": "Standard Generalized Markup Language",
                    "Acronym": "SGML",
                    "Abbrev": "ISO 8879:1986",
                    "GlossDef": {
                        "para": "A meta-markup language, used to create markup languages such as DocBook.",
                        "GlossSeeAlso": [
                            "GML",
                            "XML"
                        ]
                    },
                    "GlossSee": "markup"
                }
            }
        }
    }
}



PLATFORM

Here is the supported platform for this plugin.

  • This plugin support Windows 10 and above.
  • This plugin support Linux (Ubuntu).
  • This plugin support Mac.

Version

1.515.1506

Limitation

SEE ALSO

LICENSE

Panel

Table of Contents
maxLevel3
stylenone


NAME


Data Conv is used to convert a file format among JSON, XML, CSV.


SYNOPSYS


Data Conv needs next parameters or options.

Parameter


Operation

  • Supports CSV-to-TSV, CSV-to-_SV, JSON-to-XML, XML-to-JSON
  • csv2tsv: converts CSV to TSV (Tab-separated values) format
  • csv2_sv: converts CSV to a character separated values which you specify as 'Target separator'
  • json2xml / xml2json: converts JSON to XML format or vice versa

Source File

  • A source file to be converted

Target File

  • Target file to save the converted file

Options


Target separator

  • A single character to be used as separator

File Encoding

  • File encoding type of source file.
  • Default: utf8
※ NOTE
Note
Note

In case of UTF8, the encoding of a source file must be UTF-8 without BOM (Byte Order Mark)Windows Notepad saves files as ANSI by default. Even though you select UTF-8 in Notepad, it saves as UTF-8 with BOM. It's a good idea to use the 3rd party editor that supports UTF-8 without BOM , such like Notepad++, Sublime Text.





Examples

EX1. CSV-to-TSV

Paramaters

Parameters\OptionsValues
Operationcsv2tsv
Source FileC:\1.MyUtils\TestRun\TestRun\csv_sample.csv
Target FileC:\1.MyUtils\TestRun\TestResult\csv2tsv.txt

Results

(1) source file

id,first_name,last_name,email
1,Jillene,Ashness,jashness0@cisco.com
2,Briney,Lightbourne,blightbourne1@slate.com
3,Letti,Cayzer,lcayzer2@utexas.edu
4,Abramo,Gerrelts,agerrelts3@people.com.cn
5,Kaitlynn,Sussex,ksussex4@wsj.com

(2) results

id	first_name	last_name	email
1	Jillene	Ashness	jashness0@cisco.com
2	Briney	Lightbourne	blightbourne1@slate.com
3	Letti	Cayzer	lcayzer2@utexas.edu
4	Abramo	Gerrelts	agerrelts3@people.com.cn
5	Kaitlynn	Sussex	ksussex4@wsj.com

EX2. CSV-to-_SV

Paramaters

Parameters\OptionsValues
Operationcsv2_sv
Source FileC:\1.MyUtils\TestRun\TestRun\csv_sample.csv
Target FileC:\1.MyUtils\TestRun\TestResult\csv2_sv.txt
Target separator*

Results

(1) source file

id,first_name,last_name,email
1,Jillene,Ashness,jashness0@cisco.com
2,Briney,Lightbourne,blightbourne1@slate.com
3,Letti,Cayzer,lcayzer2@utexas.edu
4,Abramo,Gerrelts,agerrelts3@people.com.cn
5,Kaitlynn,Sussex,ksussex4@wsj.com

(2) results

id*first_name*last_name*email
1*Jillene*Ashness*jashness0@cisco.com
2*Briney*Lightbourne*blightbourne1@slate.com
3*Letti*Cayzer*lcayzer2@utexas.edu
4*Abramo*Gerrelts*agerrelts3@people.com.cn
5*Kaitlynn*Sussex*ksussex4@wsj.com

EX3. JSON-to-XML

Paramaters

Parameters\OptionsValues
Operationjson2xml
Source FileC:\1.MyUtils\TestRun\TestRun\json_sample.csv
Target FileC:\1.MyUtils\TestRun\TestResult\results.xml

Results

(1) source file

{
    "glossary": {
        "title": "example glossary",
		"GlossDiv": {
            "title": "S",
			"GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
					"SortAs": "SGML",
					"GlossTerm": "Standard Generalized Markup Language",
					"Acronym": "SGML",
					"Abbrev": "ISO 8879:1986",
					"GlossDef": {
                        "para": "A meta-markup language, used to create markup languages such as DocBook.",
						"GlossSeeAlso": ["GML", "XML"]
                    },
					"GlossSee": "markup"
                }
            }
        }
    }
}

(2) results

<?xml version="1.0" encoding="utf-8"?>
<glossary>
	<title>example glossary</title>
	<GlossDiv>
		<title>S</title>
		<GlossList>
			<GlossEntry>
				<ID>SGML</ID>
				<SortAs>SGML</SortAs>
				<GlossTerm>Standard Generalized Markup Language</GlossTerm>
				<Acronym>SGML</Acronym>
				<Abbrev>ISO 8879:1986</Abbrev>
				<GlossDef>
					<para>A meta-markup language, used to create markup languages such as DocBook.</para>
					<GlossSeeAlso>GML</GlossSeeAlso>
					<GlossSeeAlso>XML</GlossSeeAlso>
				</GlossDef>
				<GlossSee>markup</GlossSee>
			</GlossEntry>
		</GlossList>
	</GlossDiv>
</glossary>

EX4. XML-to-JSON

Paramaters

Parameters\OptionsValues
Operationxml2json
Source FileC:\1.MyUtils\TestRun\TestRun\xml_sample.csv
Target FileC:\1.MyUtils\TestRun\TestResult\results.json

Results

(1) source

<?xml version="1.0" encoding="utf-8"?>
<glossary>
	<title>example glossary</title>
	<GlossDiv>
		<title>S</title>
		<GlossList>
			<GlossEntry>
				<ID>SGML</ID>
				<SortAs>SGML</SortAs>
				<GlossTerm>Standard Generalized Markup Language</GlossTerm>
				<Acronym>SGML</Acronym>
				<Abbrev>ISO 8879:1986</Abbrev>
				<GlossDef>
					<para>A meta-markup language, used to create markup languages such as DocBook.</para>
					<GlossSeeAlso>GML</GlossSeeAlso>
					<GlossSeeAlso>XML</GlossSeeAlso>
				</GlossDef>
				<GlossSee>markup</GlossSee>
			</GlossEntry>
		</GlossList>
	</GlossDiv>
</glossary>

(2) results

{
    "glossary": {
        "title": "example glossary",
        "GlossDiv": {
            "title": "S",
            "GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
                    "SortAs": "SGML",
                    "GlossTerm": "Standard Generalized Markup Language",
                    "Acronym": "SGML",
                    "Abbrev": "ISO 8879:1986",
                    "GlossDef": {
                        "para": "A meta-markup language, used to create markup languages such as DocBook.",
                        "GlossSeeAlso": [
                            "GML",
                            "XML"
                        ]
                    },
                    "GlossSee": "markup"
                }
            }
        }
    }
}

PLATFORM

Here is the supported platform for this plugin.

  • This plugin support Windows 10 and above.
  • This plugin support Linux (Ubuntu).
  • This plugin support Mac.

Version

1.515.1506

Limitation

SEE ALSO

LICENSE