{ "ns" : "http://zorba.io/modules/json-csv", "description" : " This module provides an API for parsing and serializing CSV (comma-separated\n values) files.\n See RFC 4180,\n \"Common Format and MIME Type for Comma-Separated Values (CSV) Files.\"\n", "sees" : [ ], "authors" : [ "
\n Quoted values are always considered strings;\n unquoted values are attempted to be cast to other types, e.g., integer\n (unless the cast-unquoted-values
option is false
).\n Casting is attempted in the following order:\n integer, decimal, double, and boolean.\n If casting fails, the value is considered a string.\n Header field names are always considered strings even if unquoted.\n
\n In addition to the \"normal\" values of\n true
and false
for boolean,\n T
and Y
are also considered \"true\"\n and F
and N
are also considered \"false.\"\n
\n The default options are:\n
cast-unquoted-values
true
.\n extra-name
csv:EXTRA_VALUE
is raised).\n field-names
missing-value
\"null\"
.\n A \"missing\" value is one of:\n quote-char
characters.quote-char
character as either the first\n or last character on a line.null
.\n quote-char
\"
(U+0022).\n quote-escape
quote-char
;\n default: same as quote-char
.\n This means that an escaped quote is doubled as \"\"
.\n separator
,
(U+002C).\n Parses a CSV (comma-separated values) string using the default options.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "csv", "type" : "string", "occurence" : null, "description" : "\n Quoted values are always considered strings;\n unquoted values are attempted to be cast to other types, e.g., integer\n (unless the cast-unquoted-values
option is false
).\n Casting is attempted in the following order:\n integer, decimal, double, and boolean.\n If casting fails, the value is considered a string.\n Header field names are always considered strings even if unquoted.\n
\n In addition to the \"normal\" values of\n true
and false
for boolean,\n T
and Y
are also considered \"true\"\n and F
and N
are also considered \"false.\"\n", "summary" : "
Parses a CSV (comma-separated values) string using the given options.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "csv", "type" : "string", "occurence" : null, "description" : "cast-unquoted-values
true
. extra-name
csv:EXTRA_VALUE
is raised). If this option is given and a line contains one or more extra values (that is, values that have no corresponding field names), then the extra values are assigned as the values for fields having extra-name
as their names. If extra-name
contains a #
(U+0023), then the #
is substituted with the field number (where field numbers start at 1). If extra-name
does not contains a #
, then the field number is appended. field-names
missing-value
\"null\"
. A \"missing\" value is one of: separator
characters.separator
character as either the first or last character on a line.\"error\"
csv:MISSING_VALUE
is raised.\"omit\"
\"null\"
null
.quote-char
\"
(U+0022). quote-escape
quote-char
; default: same as quote-char
. If quote-escape
equals quote-char
, it means that quote-char
must be doubled to escape it. If quote-escape
does not equal quote-char
, it means that quote-escape
is used to escape quote-char
. For example, a quote-char
of \"
(U+0022) and a quote-escape
of \\
(U+005C) means that quotes will be escaped by \\\"
. separator
,
(U+002C). quote-char
, quote-escape
, or separator
option is given and it's not a single ASCII character.missing-value
option is \"error
\".extra-name
option is not set.field-names
serialize-boolean-as
true
and false
as;\n default: true
and false
.\n serialize-header
true
.\n The first string result is the header line\n comprised of all the objects' keys' names.\n serialize-null-as
null
values as;\n default: null
.\n quote-char
\"
(U+0022).\n quote-escape
quote-char
;\n default: same as quote-char
.\n This means that quote-char
is doubled to escape it.\n separator
,
(U+002C).\n Serializes a sequence of JSON objects as CSV (comma-separated values) using\n the default options.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "obj", "type" : "object()", "occurence" : null, "description" : "Serializes a sequence of JSON objects as CSV (comma-separated values) using\n the given options.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "obj", "type" : "object()", "occurence" : null, "description" : "field-names
serialize-boolean-as
true
and false
as; default: true
and false
. This must be a sub-object with the two keys \"true\"
and \"false\"
, e.g.: { \"true\" : \"Y\", \"false\" : \"N\" }
. serialize-header
true
. If true
, the first string result is the header line comprised of all the objects' keys' names; if false
, the heder line is not returned. serialize-null-as
null
values as; default: null
. quote-char
\"
(U+0022). quote-escape
quote-char
; default: same as quote-char
. If quote-escape
equals quote-char
, it means that quote-char
must be doubled to escape it. If quote-escape
does not equal quote-char
, it means that quote-escape
is used to escape quote-char
. For example, a quote-char
of \"
(U+0022) and a quote-escape
of \\
(U+005C) means that quotes will be escaped by \\\"
. separator
,
(U+002C).