Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(csv) Add JAX-RS Provider implementation for CSV module #16

Closed
cowtowncoder opened this issue Mar 20, 2017 · 3 comments
Closed

(csv) Add JAX-RS Provider implementation for CSV module #16

cowtowncoder opened this issue Mar 20, 2017 · 3 comments
Labels

Comments

@cowtowncoder
Copy link
Member

(from FasterXML/jackson-dataformat-csv#35 @ffbit)

It'd be good to have the jackson-jaxrs-cvs-provider derived from this artifact.

@cowtowncoder
Copy link
Member Author

(comment by @TuomasKiviaho)

crafted my own which was mostly just copy/pasting of the json-provider and overwriting of the readFrom(/writeTo) method(s) using POJO approach for the schema. readValue works fine for SimpleType, but it seems that MappingIterator via readValues is currently the only option for CollectionLike/ArrayType. Could there be a detection in schemaFor(JavaType) for this and a corresponding CsvParser.Feature (for instance) that enables outputting of POJOs inside of collections/arrays(/maps?). This would suit JAX-RS better than the Jackson specific MappingIterator

@cowtowncoder
Copy link
Member Author

Hmmh. Interesting thought. readValue() should work just fine for arrays/Collections, but handling of schema would need special care. And it would, I think, make sense to add special handling for these types in CsvMapper -- there is no other way to create a schema for such types.

I think I need to file a separate issue for that.

@cowtowncoder
Copy link
Member Author

Dup of FasterXML/jackson-jaxrs-providers#21 actually -- will close. But at ref back for some of the ideas by @TuomasKiviaho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant