Skip to main content

Why a Rust plugin can reject valid JSON

Run a JSON check first, then compare the edited field with a default config from the same plugin version. A file can parse as JSON while giving the plugin a string where it expects a list.

Check punctuation separately from the value

If the checker reports an error near a closing brace, look at the previous line for a trailing comma. In an example setting, {"Enabled": true,} has invalid JSON punctuation. {"Enabled": true} parses, and its value is a Boolean. The value "true" with quotes parses as text instead.

Copy the shape of the default value. If an example field says "Channels": ["general"], adding another value belongs inside the brackets. Changing it to "Channels": "general, trade" produces one string. A checker cannot tell which kind the plugin expects.

Recover the small edit

Save the rejected file separately if the plugin has left it in place. Compare it with the last working copy or a fresh default generated by the same release on a test host. Change only the intended value in that known shape, apply it and watch for a new config error.

If the plugin regenerated defaults, bring your settings forward one feature at a time. Start with the change you can observe in game before carrying over the remaining values.

Sources

Analytics settings

Analytics are off.

Help improve RustSC with page counts and performance measurements. Privacy details