Extending Custom Widget Parameters Beyond Primitive Types

What is the best practice for handling complex parameter types in custom widgets?

Beyond built-in types like number, string, boolean, and array, how can we support:

  • Dropdown / select parameters

  • Structured data (object/struct/JSON)

Are there recommended patterns for defining, validating, and consuming these parameters inside a custom widget?