Skip to content

Conversation

Jin-W-FS
Copy link

Though non-standard, sometimes it is convenient to have this feature when hand-writing a json config file.
Simply skip anything between // and the end of the line \r or \n; except when the '/' is in a string.
Enabled by set json_settings.settings |= json_one_line_comment(0x2)

though non-standard, some times it is convient to have the feature
when hand-writing a json config file.
@LB--
Copy link
Member

LB-- commented Jan 24, 2014

Why not do this via the json_settings instead, so it can be configured at runtime?

@Jin-W-FS
Copy link
Author

Just don't want change the interface before I can make sure others can
accept it. Any way, that's enough for me. OK, I'll work on.
ÔÚ 2014-1-24 ÉÏÎç11:45£¬"LB--" notifications@github.comдµÀ£º

Why not do this via the json_settings instead, so it can be configured at
runtime?

¡ª
Reply to this email directly or view it on GitHubhttps://github.com//pull/42#issuecomment-33195195
.

json.h Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering relaxed commas is also non-standard, I think this comment is slightly redundant ;)

@jamesamcl
Copy link
Collaborator

Thanks, merged in 8001c6c although I ended up changing the logic a bit to allow for both // and /* */ style comments.

What name would you like for the AUTHORS file?

@Jin-W-FS
Copy link
Author

Thanks. C-style Block comment is nice.
Jin Wei is OK.

@jamesamcl jamesamcl closed this in 32d2dfa Mar 26, 2014
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

Successfully merging this pull request may close these issues.

3 participants