Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Parser does not support buffer object? #14

Open
magwo opened this Issue · 1 comment

2 participants

Magnus Wolffelt Benjamin Lupton
Magnus Wolffelt

Hello,

it seems to me that the CSON parser does not, in contrast to the JSON parser, support buffer objects as returned by for example fs.readFileSync().

CSON.parseSync(fs.readFileSync filename) # Does not parse file contents

Note that you only get a buffer object if you do not specify encoding:
http://nodejs.org/api/fs.html#fs_fs_readfilesync_filename_encoding

Benjamin Lupton
Owner

Hrmmm... So you're saying: JSON.parse(fs.readFileSync filename) works? When is a use case when someone would want to do this over just providing the filename?

Benjamin Lupton balupton closed this
Benjamin Lupton balupton reopened this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.