11,117
  • Support both XML and JSON in a Spring API (RWS - Module 2 - Lesson 5)

    15,609 views 3 years ago
    Learn how to implement Content Negotiation in the API with Spring and how to support both JSON and XML.

    For the entire "REST With Spring" series: https://www.youtube.com/pla......

    This lesson is part of "REST With Spring" - Module 2 (REST and HTTP Semantics) - Lesson 5:
    http://youtube.restwithspri...

    ## Lesson Notes

    # The Maven Dependencies
    - jackson-dataformat-xml
    - woodstox-core-asl

    # Advantages of using Jackson for XML
    Using the new Jackson Spring support for XML has quite a few advantages over using another XML library (such as XStream):
    - we're already using Jackson for JSON
    - we can re-use the exact same configuration that we're already using for JSON
    - no need to add extra annotations to the DTOs
    - JSON Views support

    # Why change the default STAX implementation
    Woodstox has a few advantages over the default STAX impl in the JDK:
    - it's faster
    - has extra features
    - it's more mature and well maintained


    To learn more about REST and how to properly implement these HTTP semantics, check out the full course:
    http://youtube.restwithspri...

    Enjoy. Show less
    Read more
  • Uploads Play all

    This item has been hidden
to add this to Watch Later

Add to

Loading playlists...