Replies: 2 comments 4 replies
-
|
Yeah, this lines up with what you’re seeing in #4976. The behavior isn’t really about JSONC parsing itself, but how Json::Value is being serialized afterward. Even if you disable collectComments, toStyledString() still generates a formatted representation of the value, and it can carry over those comment-like artifacts or extra formatting into the output. So the issue ends up looking like comments are “attached” to the next key, when in reality it’s just how the value is being stringified. |
Beta Was this translation helpful? Give feedback.
-
|
I’ve added a small note in the wiki (Writing Modules) about the current config_entries behavior that might help others. Feel free to adjust if anything needs correction. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
###Description
Issue #4976 raise a question about config issue of CFFI modules. When CFFI modules parsing config, it somehow fetch the comment. And i find the thing to blame, in
cffi.cpp:60toStyledString()would fetch the comment here, so i try to tackle it at sourceinclude/util/json.hpp:35Here i add
readerBuilder[collectcomments] = falsebut of coursetostyledstring()return human readable string so\"remain at the return value.Although the issue didnt mention his
wbcffi_version, i guess it is equal 2 so it hit thetoStyledString()branch.Summary
so i really wanna know, what's the difference between
wbcffi_version1 and others, and what kind of parameter does it really want. And is there any way to parse the raw string from Json::Value without breaking the logical here.Beta Was this translation helpful? Give feedback.
All reactions