Comments (17)
For documentation purposes, I'll note that feature itself was actually added in 2.9, but implementation not. This is unfortunate.
from jackson-dataformats-text.
And there was much rejoining for now @vboulaye's patch is merges into 2.10
, and the feature shall be supported in patch release 2.10.1!
from jackson-dataformats-text.
Is anyone working on this? I would be happy to pick it up.
from jackson-dataformats-text.
Quick note: I think this makes more sense as CsvParser.Feature
than CsvSchema
setting since it's not as much a property of document than handling (although I can see why someone might argue otherwise too). But I think this is more convenient from user perspective.
from jackson-dataformats-text.
note: Original had 5 thumbs-up, couple of +1s. So highly requested.
from jackson-dataformats-text.
@kg29 No one is workign on this as far as I know, so help would be highly valued!
from jackson-dataformats-text.
This is the only thing preventing us from switching from commons-csv.
from jackson-dataformats-text.
@kunickiaj One thing that could help (I may have time to look into this after completing non-blocking json parser) would be a failing unit test that simply shows how you'd like this to work. That is, test that would pass after fix.
from jackson-dataformats-text.
Yeah, I may look into this once I get a free moment.
We did some benchmarks against jackson csv + guard clause on our side vs commons-csv and it pretty much wiped out any performance gains from moving to jackson.
Figure fixing it here should be a much better option.
from jackson-dataformats-text.
Here's a trivial test which would pass given the desired behavior.
from jackson-dataformats-text.
Excellent thank you; I'll have a look.
from jackson-dataformats-text.
Hmmh. Looking at code, this may not be easy to implement. As things are, START_OBJECT
(or, without schema, START_ARRAY
) is returned without looking at line. Logic would need to check for this setting, then do look-ahead... maybe that works.
from jackson-dataformats-text.
Hi @cowtowncoder how did this go? Has this been implemented? Your last comment was a wee bit confusing.
Cheers,
Ed
from jackson-dataformats-text.
@ehills No, functionality has not been added and does not exist.
from jackson-dataformats-text.
Maybe I misunderstand something here, but from the description in the first comment, I think this should be described as "skip blank lines", i.e. lines with only whitespace. Maybe you'd like to add SKIP_BLANK_LINES instead of changing SKIP_EMPTY_LINES to do this, otherwise code which uses the library could change its behaviour when using the new version.
Also, in the linked unit test I don't find any blank (only whitespace) lines, just empty lines:
Current CSV string:
final String CSV = "1,"xyz"\n\ntrue,\n";
Test for blank line being removed would need something like:
final String CSV = "1,"xyz"\n\ntrue,\n \n";
The rest of the test would be identical.
Cheers, Anders
from jackson-dataformats-text.
Not works for me yet
from jackson-dataformats-text.
Good point on "skip blank" vs "skip empty".
from jackson-dataformats-text.
Related Issues (20)
- Update to SnakeYAML 2.1
- support for StreamReadConstraints (max name, document lengths)
- Parse YAML Keys with dots as dereferenced Map HOT 5
- Query on Jackson-dataformat-yaml usage HOT 2
- Missing Copyright information HOT 2
- Exception when attempting to use `ObjectMapper.readValues<T>(parser).readAll()` when parser is pointing to `START_ARRAY` HOT 5
- (yaml) Minor parsing validation miss: tagged as `int`, exception on underscore-only values
- `BigInteger` and `BigDecimal` are quoted if `CsvGenerator.Feature.ALWAYS_QUOTE_STRINGS` enabled
- Allow configuring Array value "wrappers" (like `[` and `]`) for `CsvSchema`
- `YAMLParser` throws unexpected `NullPointerException` in certain number parsing cases
- Yaml keys starting with number are being double quoted when mapper.writeValue() HOT 1
- Yaml Output differs from Json Output for Subtypes HOT 4
- INI Support HOT 4
- Unexpected `NumberFormatException` in `YAMLParser`
- Support max Read/Write nesting depth limits (`StreamReadConstraints`/`StreamWriteConstraints`) for YAML HOT 1
- Nesting objects within other objects (in YAML) HOT 1
- Weird issue with dates HOT 2
- Snakeyaml version used produces java.lang.NoSuchMethodError HOT 2
- Pkl support HOT 3
- TOML `TomlParserTest#float` fails on master (3.0) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jackson-dataformats-text.