-
-
Notifications
You must be signed in to change notification settings - Fork 873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comma in serialization result #2001
Comments
I'm trying to achieve the result when serialized object could have some data on success or error |
Also experiencing the same issue. With a schema of only optional properties, when the first optional property in the schema is missing from the object, the serialized output has a comma at the start, causing JSON validation issues downstream. |
That does look like a bug - the fix should be simple - PR is welcome, otherwise I’ll fix some time next month. |
@epoberezkin Please have a look at #2028 |
What version of Ajv are you using? Does the issue happen if you use the latest version?
Version: 8.11.0, JTD
Ajv options object
JSON Schema
Sample data
Your code
Serialized data (NOTICE COMMA)
What results did you expect?
{"error":"Something went wrong"}
Are you going to resolve the issue?
Yes, look at #2028
The text was updated successfully, but these errors were encountered: