[RMMZ] PARAMETER PARSING

Posts

Pages: 1
Plugin parameters and command arguments give us lots of data types, including structures.
Unfortunately these are all encoded as strings, and it's left to the plugin to decode it. The 'schema' expressed in magic comments is only accessible to the editor.

Which leads to lots of boiler plate repetitive code - a simple JSON.parse returns booleans and numbers as strings, structures as encoded strings that need to be JSON parsed again.

What approaches are people taking to this?
I've seen hungarian notation (embedding type information in the parameter names), but dislike this if there's a better option.
Using a schema or fixed code relies on replicating the information faithfully in the magic comments used by the editor.
Pages: 1