You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using YamlDotNet in an another open source project.
When I generate a list of object/strings it will be parsed surrounded with singe quote by default like:
'[ubuntu-latest, windows-2022, macos-latest]'
This give compilation error:
The correct way should be like without quotes
[ubuntu-latest, windows-2022, macos-latest]
I just feel that writing a customized method to remove this is not nice when we have ScalarStyle
I was expecting that I have an option like ScalarStyle = ScalarStyle.NoneQuoted or ScalarStyle.None
The text was updated successfully, but these errors were encountered:
maythamfahmi
changed the title
[YamlMember(ScalarStyle = ScalarStyle.NoneQuoted)]
Suggest adding ScalarStyle.NoneQuoted for none surrounded quotes
Feb 11, 2022
maythamfahmi
changed the title
Suggest adding ScalarStyle.NoneQuoted for none surrounded quotes
Adding ScalarStyle.NoneQuoted for none surrounded quotes
Feb 11, 2022
@aaubry you are right I was not aware that and thank you for making me aware of it.
My problem to start with, I tried to make a list looks like a string like this just to follow the yaml format [ubuntu-latest, windows-2022, macos-latest] from the example I am working on.
But I was not aware that
[ubuntu-latest, windows-2022, macos-latest]
are the same as
- ubuntu-latest
- windows-2022
- macos-latest
No need for this feature as I works now by using list.
I am using YamlDotNet in an another open source project.
When I generate a list of object/strings it will be parsed surrounded with singe quote by default like:
'[ubuntu-latest, windows-2022, macos-latest]'
This give compilation error:
![image](https://user-images.githubusercontent.com/9260645/153562415-2bf83919-b8e8-4346-91c4-e8a44e2a5a66.png)
The correct way should be like without quotes
[ubuntu-latest, windows-2022, macos-latest]
![image](https://user-images.githubusercontent.com/9260645/153562627-912a3e3c-4a5b-4c5f-9e9c-77f9cba21b41.png)
I just feel that writing a customized method to remove this is not nice when we have ScalarStyle
I was expecting that I have an option like ScalarStyle = ScalarStyle.NoneQuoted or ScalarStyle.None
The text was updated successfully, but these errors were encountered: