catap / jaql

Jaql is a query language designed for Javascript Object Notation (JSON), a data format that has become popular because of its simplicity and modeling flexibility. Jaql is primarily used to analyze large-scale semi-structured data. Core features include user extensibility and parallelism. In addition to modeling semi-structured data, JSON simplifies extensibility. Hadoop's Map-Reduce is used for parallelism.
2 stars 0 forks source link

Add escaping support for the conversion from/to CSV #83

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Add escaping support for the conversion from/to CSV.

For the conversion from JSON to CSV, if escape option is true, the
following escapings happen:
1. " is escaped into "".
2. Some characters are escaped into 2-character sequence such as \t (2
characters).
3. Some ISO control characters are escaped into 6-character controls such
as \u008a.

For the conversion from CSV to JSON, escape option is in effect only if
quoted option is true. 
1. "" is unescaped into ". 
2. 2-character escape sequence for c0 controls such as \t (2 characters)
are unescaped into the character represented by the escape sequence.
3. 6-character escape sequence such as \u008a are also unescaped into the
uicode represented by the escape sequence.

For a input CSV file containing "\\" (4 characters), 
1. \ (1 backslash character) is the unescaped result if quoted option and
escape option are true. 
2. \\ (2 blashslash characters) is the unescaped result if quoted option is
true and escape option is false. 
3. "\\" (1 quotation mark, 2 bashslashs and 1 quotation mark) is resulted
if quoted option is false.

Original issue reported on code.google.com by yaojingguo@gmail.com on 2 May 2010 at 1:05

GoogleCodeExporter commented 8 years ago
Since there is no way to correct the previous comment. I decide to close it and 
open
another issue for this enhancement.

Original comment by yaojingguo@gmail.com on 2 May 2010 at 1:35