Skip to content

Retrieve column in the record struct #378

Answered by BurntSushi
Dsaquel asked this question in Q&A
Discussion options

You must be logged in to vote

csv isn't a typed format, so comparing it with json in this specific regard doesn't really make sense. JSON specifically has numbers, strings, arrays, objects and so on. csv has nothing but records and fields, with no inherent nesting structure, and where all fields are just strings. Any additional encoding on top of that is generally bespoke.

You might consider just using s csv::Record. That exposes the "records are just a sequence of strings" representation. That is the spiritual equivalent of a serde_json::Value.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Dsaquel
Comment options

@BurntSushi
Comment options

@Dsaquel
Comment options

@BurntSushi
Comment options

@Dsaquel
Comment options

Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants