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

Feature Request: Add Support for System.Text.Json in SlackNet #224

Open
huoshan12345 opened this issue Jan 9, 2025 · 1 comment
Open

Comments

@huoshan12345
Copy link

Hi,

Thank you for maintaining SlackNet and making it an excellent library.
Currently, SlackNet uses Newtonsoft.Json for JSON serialization and deserialization.
I would like to request adding support for System.Text.Json in SlackNet.

Suggested Implementation:

  • Introduce a mechanism (e.g., an interface or factory) that allows developers to plug in a custom JSON serializer.
  • Provide a default implementation for both Newtonsoft.Json and System.Text.Json.

Thank you for considering this feature request. Please let me know if I can help with further details or testing!

@soxtoby
Copy link
Owner

soxtoby commented Jan 11, 2025

Hi @huoshan12345. At some point I do want to switch to System.Text.Json, but it won't be straightforward.

SlackNet makes a lot of customizations to the serialization in order to support Slack's serialization standards, which would all need to be re-implemented with the STJ API.

Additionally, many classes rely on Newtonsoft.Json's attributes, and types like JObject, which have equivalents in STJ, but which would make it difficult, if not impossible, to support multiple serialization libraries.

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

No branches or pull requests

2 participants