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

Any plan for System.Text.Json? #653

Open
7amou3 opened this issue Aug 11, 2023 · 8 comments
Open

Any plan for System.Text.Json? #653

7amou3 opened this issue Aug 11, 2023 · 8 comments

Comments

@7amou3
Copy link

7amou3 commented Aug 11, 2023

Hello
Thank you guys for this awesome library

I would like to know if there is any plan to drop the Newtonjson serializer, and use the System.Text.Json?
Another idea would be to move the serializers outside the core project, and let the user choose which serializer to include,
example if I want to work with System.text.json I would import 2 packages: Docker.DotNet and Docker.DotNet.Text.Json.

Why?
1- The NewtonJson - Although it was a great library - will not support Aot
2- Remove a hard dependency from the core project
3- Performance of the System.Text...

@NCLnclNCL
Copy link

mee too

@lukewis
Copy link

lukewis commented Oct 3, 2023

Lack of AOT support is a deal breaker for me. I had to resort to writing my own implementation.

@galvesribeiro
Copy link
Member

galvesribeiro commented Oct 3, 2023

Hey! Sorry for the delay.

Although it is going slowly (slower than I would like tbh), I'm working on a full refactory of the library behind the scenes. I've made good progress but it is not ready for prime time yet as I need to be very careful. I understand many other projects have dependencies on this library and this next one will potentially be a breaking change so I have to make it worth.

This refactory, among other things, aims to:

  1. Update everything to latest .Net
  2. Drop JSON.Net and use System.Text.Json with Source Generators - Since the Docker APIs use JSON for serialization, it makes not much sense to have multiple JSON serializers and since STJ is miles away faster than JSON.Net and has Roslyn Source Generators for the serializers, I'm sticking to it. The fact that all serializers will be source generated means that there is not reflection, so it is out of the box AoT friendly
  3. Drop the handmade Go model generator - The new version uses Roslyn source generator on top of the publicly available Docker API Swagger schema. That way we don't need to be tied anymore to the Go source code and make updates to the library stupid simple

I maybe will have a preview version before the .Net Conf. Will see.

Thanks for the interest and support, I'll keep everyone updated once I have more to share.

@lukewis
Copy link

lukewis commented Oct 3, 2023

That sounds fabulous. I appreciate the update and hard work!

@7amou3
Copy link
Author

7amou3 commented Nov 7, 2023

@galvesribeiro can you share the repository please? even if it's not ready yet

@kanpov
Copy link

kanpov commented Jun 15, 2024

Honestly, I think a better route would be to bind to Podman's libpod API and transition away from using Docker whatsoever, as Docker has been lagging behind as a container runtime. The API in question

The fact this project hasn't had commits for over a year only adds to my concern. Quite disappointing for an "official" .NET project that Testcontainers relies on (=is blocked by).

@galvesribeiro
Copy link
Member

@kanpov Docker is not going anywhere tbh. Yes, it is slow moving than other newcomer libraries.

I thought however, on having (after the revamp on Docker.DotNet) other container runtime library support like for example, containerd, maybe podman. Perhaps rebranding Docker.DotNet to Container.DotNet. I'll discuss with others and perhaps open a pool somewhere to see if this would be a good idea but first, need to finish the revamp the current library.

@0xced
Copy link
Contributor

0xced commented Sep 25, 2024

Somehow I missed @galvesribeiro comment who said he was working on a full refactoring so I went ahead with #672 which replaces Newtonsoft.Json with System.Text.Json. Maybe it can help move forward.

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

No branches or pull requests

6 participants