Plugin Parameters within Structure - Boolean and Number converted to String (bug in MV?)

Hello all, I wanted to get the opinion of the community before reporting this as a bug with MV.

Take this sample plugin below:
Code:
/*:
* @plugindesc Shows a bug with plugin parameters?
* @param My Structure
* @type struct<Sample>
*/

/*~struct~Sample:
* @param name
* @type text
* @default "foo"
*
* @param value
* @type number
* @default 1
*
* @param enabled
* @type boolean
* @default true
*/

Consider what happens if we try to parse this structure, this is the result:
Code:
var params = PluginManager.parameters("SamplePlugin");
var myStruct = JSON.parse(params["My Structure"]);
console.log(myStruct.value); // Returns "1" rather than 1
console.log(myStruct.enabled); // Returns "true" rather than true
// Compare side by side to see that it incorrectly stringified the structure
console.log(params["My Structure"]);
console.log(JSON.stringify({"name":"foo","value":1,"enabled":true}));



My assertion:
If a plugin parameter is defined as a number/boolean in a structure, it should be stringified as a number/boolean. When we parse the structure, it should be in the correct format.

Can some of the JS savvy members validate or rebuke my assertion? Also, feel free to correct me on any terminology.
Doesn't console.log turn the argument into a string? What you have done is not the recommended way of parsing plugin parameters.
Doesn't console.log turn the argument into a string?

Not to my knowledge, for example try:
console.log(true);
console.log("true");
And they will be different colors in the console.

That wasn't really my point though, it was more an attempt to illustrate the point.

What I get when I parse the parameter is:
{"name":"foo","value":"1","enabled":"true"}

My assertion is that it should be this:
{"name":"foo","value":1,"enabled":true}

What you have done is not the recommended way of parsing plugin parameters.

It is, based on this thread, however that is 7 months old. Is there a newer recommendations/updates since then?
I missed the little bit where it said parsing, but I wasn't looking at structures.

The same post gives an example of a boolean towards the top of the page, under @text, and it indicates the value will be "true" rather than true. Doesn't use parsing though.

Sorry can't be of much help.
The same post gives an example of a boolean towards the top of the page, under @text, and it indicates the value will be "true" rather than true.
That's a fair point. So by extension, I shouldn't be surprised when the behavior is consistent for structures as well.

I've changed my mind then, not a bug, just a quirk to keep in mind. Thanks for the replies!
Sorry to post in this old thread. I am now developing plugins for RMMV for my first time and until I saw this thread, I was stressing over this. I couldn't understand why my code didn't work! My Booleans kept on being treated as strings. Now I see that it's a bug/quirk in the RMMV Plugin Manager itself. I would prefer that the types like Booleans and integers would be treated as what they are rather than strings. It would be nice if they would patch RMMV to fix this little bug/quirk! It shouldn't be this way.

Original thread: https://forums.rpgmakerweb.com/threads/plugin-parameters-within-structure-boolean-and-number-converted-to-string-bug-in-mv.89643/