public class Csv extends Object
Constructor and Description |
---|
Csv() |
Modifier and Type | Method and Description |
---|---|
static Object |
fromCsv(String csv) |
static Object |
fromCsv(String csv,
boolean withTokens) |
static String |
toCsv(Object jsonValue)
Write the contents of the
jsonValue to CSV formatted string following
RFC 4180. |
static void |
toCsv(Object jsonValue,
String name,
StringBuilder target,
int indent)
Write the contents of the
jsonValue to CSV formatted string following
RFC 4180. |
public static String toCsv(Object jsonValue)
jsonValue
to CSV formatted string following
RFC 4180. Note data in all fields is enclosed in double quotes.
Additionally, since CSV is a flat file format, nesting of data is not directly supported. That is, field
values having type Bindings
or List
, although legal Bindings value types, have no representation
in CSV. Currently, such values are simply converted to strings via toString()
, however this may change in
a future revision.public static void toCsv(Object jsonValue, String name, StringBuilder target, int indent)
jsonValue
to CSV formatted string following
RFC 4180. Note data in all fields is enclosed in double quotes.
Additionally, since CSV is a flat file format, nesting of data is not directly supported. That is, field
values having type Bindings
or List
, although legal Bindings value types, have no representation
in CSV. Currently, such values are simply converted to strings via toString()
, however this may change in
a future revision.Copyright © 2024. All rights reserved.