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

CSON.stringify() uses ", not ' #47

Closed
SJAnderson opened this issue Aug 8, 2014 · 6 comments
Closed

CSON.stringify() uses ", not ' #47

SJAnderson opened this issue Aug 8, 2014 · 6 comments

Comments

@SJAnderson
Copy link

stringifySync() uses double quotes in the output, would be better for readability if it had single quotes. Thoughts on this?

Currently:

{
  name: "steve"
  gender: "male"
}

Desired:

{
  name: 'steve'
  gender: 'male'
}
@balupton balupton changed the title CSON.stringify() should output CSON.stringify() should output Aug 8, 2014
@SJAnderson SJAnderson changed the title CSON.stringify() should output CSON.stringify() uses ", not ' Aug 8, 2014
@RobLoach
Copy link
Contributor

npm writes double quotes in package.json. Not sure what makes single quotes more readable. Could you provide more information or examples? Maybe we could make it a configuration option, or something.

@ghost
Copy link

ghost commented Aug 11, 2014

@RobLoach That's because JSON requires double quotes.

@balupton
Copy link
Member

balupton commented Feb 6, 2015

Fixed in v2

@balupton balupton closed this as completed Feb 6, 2015
@samestep
Copy link

samestep commented May 24, 2017

@balupton As far as I can tell, this issue still persists.

@balupton
Copy link
Member

guessing the fixed was an incorrect thing - this would be a cson-parser thing - we could add an option to do a conversion here, but it is likely best another package

@samestep
Copy link

Agreed; I raised an issue in cson-parser to resolve this.

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

4 participants