I am trying to follow the DDD principles in my design, and I'm trying to keep my domain entities clean. I have to create serializer class (which uses json.net) and I don't know where to put it. I considered the following options:
- Creating a utility project would be easy, but it would just drive a spike through the onion.
- It is a bit similar to the Repositories because it contains actual implementation and has a dependecy (like the repo uses EF), but it does not store the object, just converts it.
- It is not a domain service, as it does not contain business logic
- Putting it into outer layer like Application or UI would not make too much sense to me.
Here is my project structure:
Web
Application
DomainServices
Repositories
DomainModel