On Sun, Jun 14, 2020 at 10:08 AM Marek Andreánsky <[email protected]> wrote: > > Hi, > first time poster with a question that is probably easy to resolve, but the > solution eluded me so far. > > I'm trying to parse a .csv file with built in arrays (this file) following a > Baeldung tutorial but the colons in arrays are confusing the parser, and I am > unsure how to tell it what I am giving it. > >> Too many entries: expected at most 16 (value #16 (15 chars) """60 - >> Pipboy""") >> at [Source: (com.fasterxml.jackson.dataformat.csv.impl.UTF8Reader); line: >> 5, column: 188] > > > Jackson is a powerful library and I would like to learn to use it more for > other data types (really nice for parsing Jsons) but am currently stuck at > this issue. >
There is no support for this notation currently: array values are expected to be included without extra surrounding, separated by "arrayElementSeparator" which defaults to semicolon ";" (but configurable using `CsvSchema`). If someone wants to work on functionality to allow "wrapped" values (it sounds like a reasonable idea to me), I can help, but until this is implemented you would need to use a custom deserializer that reads a String value (JsonToken.VALUE_STRING) and processes it as expected. -+ Tatu +- -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/CAL4a10gn3ZbFuMUK5tmJ7XpOyjv4DCuX4_mfNNtRVZxBFeZefQ%40mail.gmail.com.
