# Why a Rust plugin can reject valid JSON

[Rust server guides](https://rustsc.com/learn/index.html.md) / [Configuration](https://rustsc.com/learn/configuration/index.html.md)

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

- [IETF JSON grammar and value types](https://www.rfc-editor.org/info/rfc8259/)
- [Oxide configuration troubleshooting](https://docs.oxidemod.com/guides/owners/configure-plugins)
- [uMod community example of a config that passes a JSON check](https://umod.org/community/server-info/23077-configuration-keeps-resetting-to-default)

## Related resources

- [Find and manage plugins](https://rustsc.com/support/guides/plugins/index.html.md)

---

HTML version: https://rustsc.com/learn/configuration/plugin-json-syntax-and-types/
