We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Not providing a mandatory field, its not throwing error.
The text was updated successfully, but these errors were encountered:
Hello,
Thank you for creating the issue. Could you please add more details that could help me in the investigation? Preferably schema and sample data.
Regards, Adrian
Sorry, something went wrong.
Hello Adrian, Below is the details... string jsonString = "{"name": "Ram", "favorite_number": 7, "favorite_color": "green"}"; var schemaJson = "{"type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["null","int"]},{"name":"favorite_color","type":["null","string"]}]}";
And My code to serialize: var jsonObject = JsonConvert.DeserializeObject(jsonString); return AvroConvert.SerializeHeadless(jsonObject, schemaJson);
If you see name is a mandatory field in schema but we are not sending it in jsonString, but it is able to serialize without any error.
Also can we convert it with jObject inseat of generic T object.
Hi,
Thank you for the details. Your suggestion is right according to the Avro specification and I will investigate implementation options.
Since this is a breaking change, I am tagging this issue as a V4 request.
Thanks, Adrian
No branches or pull requests
Not providing a mandatory field, its not throwing error.
The text was updated successfully, but these errors were encountered: