bevry / cson

CoffeeScript-Object-Notation. Same as JSON but for CoffeeScript objects.
Other
1.34k stars 56 forks source link

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

Closed SJAnderson closed 9 years ago

SJAnderson commented 10 years ago

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'
}
RobLoach commented 10 years ago

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 commented 10 years ago

@RobLoach That's because JSON requires double quotes.

balupton commented 9 years ago

Fixed in v2

samestep commented 7 years ago

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

balupton commented 7 years ago

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 commented 7 years ago

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