Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    This is not something domain driven design solves. You need a Data Transfer Object to represent the serialized and deserialized data. See martinfowler.com/eaaCatalog/dataTransferObject.html Commented Aug 29, 2018 at 22:16
  • 1
    Possible duplicate of Exposing domain models over API Commented Aug 29, 2018 at 23:05
  • This is a very interesting question. Despite all respectable opinions telling this is not a DDD concern, in some part of your architecture and code, you'll have to provide an Http Response. This will not only have your User data, it will also will have some status code and probably some hyperlinks. These elements represent a Http dependency. Yeah, most frameworks don't let you notice this, because they wrap your model with http stuff, but is not the same as your domain model Commented Jan 26, 2022 at 21:30