Currently, both InputValues and JsonSchemaEditor require users to manually add fields one by one and then choose each field’s data type.
When users already have a JSON string (for example, copied from an API response or mock data), this manual process becomes repetitive and time-consuming⏳.
It would be much more efficient if these components could automatically generate field definitions (with type inference) based on the provided JSON string.
Proposed behavior:
When the user provides a JSON string, the component:
- Parses the JSON.
- Creates fields automatically.
- Infers each field’s data type (string, number, boolean, object, array, etc.).
Benefits:
- Saves time for users handling large JSON payloads.
- Reduces human error when manually creating schema fields.
Example
{
"name": "Alice",
"age": 25,
"tags": ["developer", "openai"]
}
Result
| Field |
Type |
| name |
string |
| age |
number |
| tags |
array |