Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Parser does not support buffer object? #14

Open
magwo opened this Issue · 1 comment

2 participants

@magwo

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

@balupton
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?

@balupton balupton closed this
@balupton 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.