-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Use YAML for project files instead of JSON? #60
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
Comments
This really is a never ending debate but we chose JSON for a few reasons:
Aside, why not Xaml 😄 |
I understand the reasoning, but IMO it would be worth it. Your XAML arguments are that JSON is clean and tighter than XAML, but YAML makes JSON look ugly. It seems like project.json files are meant to be hand edited in this new world and to me having a cleaner syntax would be worth some extra effort. Especially since this is a long term architectural change. You know how tight and simple it would be to have a nice project.yaml and config.yaml sitting in your project?? :-) You know you want that. LOL Maybe the system could support both? I can see where you wouldn't want to make the whole thing pluggable and have a bunch of unknown formats that other editors would need to be able to read and understand, but I would say that you could have a single system that looks for either a project.yaml or project.json file and reads them. Hrmm... now that I think about that... it seems like that would be a bad idea too. I guess it's an all or nothing thing. |
JSON has been chosen and I don't see us supporting multiple project formats. The ecosystem needs to be consistent and I'm not a fan of supporting more than one format for the project file (maybe in another 10 years 😉). Config files are more forgiving and I could see a yaml source but the project format is wayyyy different and has more implications. BTW "Right Click -> Add Reference" is not dead. We want to have it all:
|
Yeah, I agree that supporting more than one format would be a bad idea. Also, I guess if you are a C# dev, then you already live in the world of curly braces. Sigh. :-) |
Besides Swagger, I've not used YAML extensively BUT I find it terrible. JSON looks and works better for me, at least under Visual Studio. |
I fooled around with ways of using different formats over here https://github.com/aL3891/CustomPackageReferences |
Using 'nameof' operator instead of magic strings
Why not use a more human readable and editable format like YAML instead of using the more verbose project.json format? I know that JSON is a more popular format, but YAML is pretty popular as well and is so dead simple and clean that it seems like it would make a nice clean new project system even cleaner and simpler.
Here is a sample in both JSON and YAML format. Judge for yourself.
https://gist.github.com/ejsmith/f8ff96a10675845d4293
The text was updated successfully, but these errors were encountered: