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

A yaml type provider based on this ? #37

Open
jkone27 opened this issue Dec 15, 2021 · 2 comments
Open

A yaml type provider based on this ? #37

jkone27 opened this issue Dec 15, 2021 · 2 comments

Comments

@jkone27
Copy link

jkone27 commented Dec 15, 2021

Idea for a yaml type provider

This old type provider to read yaml is not usable anymore..
https://fsprojects.github.io/FSharp.Configuration/YamlConfigProvider.html

could be handful to have an independent yaml type provider working cross platform on NET5+

just an idea

@fjoppe
Copy link
Owner

fjoppe commented Dec 26, 2021

Thanks. I've played with this idea. The complexity with yaml is freedom - ie the key in a mapping, can be a mapping itself. And even if you make an "opiniated" version, which supports a subset of yaml, I still need to work out standard patterns which convert input to either Discriminated Unions, or records with nested properties. To be honest, I haven't put effort into this.

@jkone27
Copy link
Author

jkone27 commented Dec 26, 2021

maybe recursive types could be used ("the key in a mapping, can be a mapping itself") like in trees etc..?
Probably FSharp.Data JsonValue also uses something similar..
e.g. JsonValue in FSharp.Data (used in JsonProvider):
https://github.com/fsprojects/FSharp.Data/blob/main/src/Json/JsonValue.fs#L39-39

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

No branches or pull requests

2 participants