form-js
form-js copied to clipboard
Import errors do not properly indicate miss-use
Is your feature request related to a problem? Please describe
Importing a form schema requires the schema to be already parsed as in JSON.parse. This is different from our other toolkits where passing the raw thing (XML string) is enough.
Describe the solution you'd like
There is a few things to consider here, i.e. does it make sense to force a user to parse the document herself, if she is not interested in the file format at all? We're going a different path in our other libraries (string in, string out) that I tend to find better suited.
The obvious easy pick is of course to properly indicate miss-use with better error messages.
Additional context
Applies to all form-js versions <= 0.5.0.