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

Add options to force using quotes for strings encoding #344

Open
maximkrouk opened this issue Feb 1, 2022 · 2 comments
Open

Add options to force using quotes for strings encoding #344

maximkrouk opened this issue Feb 1, 2022 · 2 comments

Comments

@maximkrouk
Copy link

maximkrouk commented Feb 1, 2022

templates:
- name: 'TCA'
  description: 'TCA template'
- name: 'MVVM'
  description: ''
  path: 'Deprecated/MVVM'

or

templates:
- name: "TCA"
  description: "TCA template"
- name: "MVVM"
  description: ""
  path: 'Deprecated/MVVM'

Instead of

templates:
- name: TCA
  description: TCA template
- name: MVVM
  description: ''
  path: Deprecated/MVVM

It's not required, just noticed that I can't control this behavior, but the thing I really would like to be customizable is to add extra indentation like:

templates:
  - name: TCA
    description: TCA template
  - name: MVVM
    description: ''
    path: Deprecated/MVVM
@bzeeman
Copy link

bzeeman commented Mar 24, 2023

I agree with this. I would qualify. it as a bug because in certain circumstances it seems you can serialize a string (in my case obvious offenders are URL paths) and when you deserialize into a dictionary using a library like AnyCodable so that you can parse arbitrary YAML, the URL paths parse to an INT of 0. This might be a bug in AnyCodable, but it seems a simple fix is to ensure quotes strings.

@bzeeman
Copy link

bzeeman commented Mar 24, 2023

On another note, the quoted string 'Off' gets deserialized to false.

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