JungiFrameworkExtraBundle
  • Introduction
  • Attributes
  • Configuration
  • Message Body Mapping
  • Content Negotiation
Powered by GitBook
On this page

Was this helpful?

Message Body Mapping

The mapping is managed by MessageBodyMapperManager. Internally it delegates the mapping to the registered mappers. By default, the SerializerMapperAdapter is used if available.

Add/replace own mapper

Simply register your mapper by using the jungi.message_body_mapper tag with the media-type attribute (media_type for yaml).

<service id="custom_xml_mapper" class="App\Http\MessageConversion\CustomXmlMapper">
    <tag name="jungi.message_body_mapper" media-type="application/x-xml" />
    <tag name="jungi.message_body_mapper" media-type="application/xml" />
    <tag name="jungi.message_body_mapper" media-type="text/xml" />
    <!-- args -->
</service>
PreviousConfigurationNextContent Negotiation

Last updated 3 years ago

Was this helpful?