The Wayback Machine - https://web.archive.org/web/20201202225651/https://github.com/twilio/twilio-csharp/issues/539
Skip to content
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

Serializing MessageResource response object using Newtonsoft throws error #539

Open
CodeFisher-02 opened this issue Sep 9, 2020 · 4 comments

Comments

@CodeFisher-02
Copy link

@CodeFisher-02 CodeFisher-02 commented Sep 9, 2020

Issue Summary

Serialization of MessageResource with Newtonsoft.json fails when in place of 'from' parameter , 'messagingserviceid' is provided

Code Snippet

 private async void CreateMessageResourceAsync(string serviceId, string recipient, string body)
MessageResource  message = await MessageResource.CreateAsync
            (
                body: body,
                messagingServiceSid: serviceId,
                to: new PhoneNumber(recipient)
            );
string str = JsonConvert.SerializeObject(message)
}

Exception/Log

System.Private.CoreLib: Exception while executing function: SendSmsAsync. Newtonsoft.Json: Value cannot be null. (Parameter 'o').

Technical details:

  • twilio-csharp version: 5.46.2
  • csharp version: .net core 3.1
  • newtonsoft version: 12.0.3
@childish-sambino
Copy link
Contributor

@childish-sambino childish-sambino commented Sep 11, 2020

Able to recreate this locally. Guessing it's because the from in the response is an empty string, but not positive.

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

@CodeFisher-02
Copy link
Author

@CodeFisher-02 CodeFisher-02 commented Sep 18, 2020

Any updates on this?

@childish-sambino
Copy link
Contributor

@childish-sambino childish-sambino commented Sep 18, 2020

No update. Still in the backlog.

@CodeFisher-02
Copy link
Author

@CodeFisher-02 CodeFisher-02 commented Oct 23, 2020

Do we have any updates here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.