Class CsvCellParser

java.lang.Object
org.apache.juneau.marshall.csv.CsvCellParser

public final class CsvCellParser extends Object
Parses CSV cell inline notation: {key:val;key2:val2} and [val1;val2;val3].

Grammar (CSV-specific, semicolon-separated):

  • Object: \{ (key ':' value (';' key ':' value)*)? \}
  • Array: \[ (value (';' value)*)? \]
  • Values: object | array | quoted string | number | identifier | null
Notes:
  • Reserved characters: ; : \{ \} [ ] " \
  • Method Details

    • read

      public static Object read(String cell, String nullMarker) throws ParseException
      Parses a cell value string into a Map, List, or scalar.
      Parameters:
      cell - The cell string (e.g. {a:1;b:2} or [1;2;3]).
      Can be null (returns null).
      nullMarker - The string that denotes null (e.g. <NULL> or null).
      Can be null (defaults to null).
      Returns:
      Parsed object: Map, List, String, Number, Boolean, or null.
      Throws:
      ParseException - If the input is invalid.