fsprojects / fsprojects/FSharp.Data

Add json type (Fsharp.Data.JsonValue) to Csv column type inference option as addition over string

Open
#1,781 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.