fsprojects / fsprojects/FSharp.Data
Add json type (Fsharp.Data.JsonValue) to Csv column type inference option as addition over string
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 874
- Forks
- 281
- Avg merge
- 55m
- Merged PRs (30d)
- 1
Description
Seems the CsvProvider parses json strings in a peculiar way,
All quotes disappear from json, making it a kind of serialised object representation not compatible with usual JsomValue or so?
at least checking with some log exports, it’s often useful to parse such export for troubleshooting or data recovery in case of incidents p, would be nice if CsvProvider could expose types so that it can be combined in use with JsonProvider. For example being able to load a column using JsonProvidedType.Root constructor accepting JsonValue
ColumnName=json extension could be useful to add to the type provider signature?
Here some workaround that was ok for some cases but is probably quite broken (didn’t put much effort into this but it did what I needed) - https://gist.github.com/jkone27/e2688005e1f3ed95d4a7d24933e68bc0#file-csvproviderjsonishparse-fsx
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the CsvProvider and JsonProvider behavior described in the issue, then compare the linked csvproviderjsonishparse.fsx workaround. Define how a CSV column can expose FSharp.Data.JsonValue and interoperate with JsonProvider; done means JSON quotes and structure are preserved and the inferred column can be consumed as JSON.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100