Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3514

Correct support for include/exclude parameters

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.1
    • 2.2.3
    • Plugin - JSON
    • None
    • Patch

    Description

      JSONResult.setIncludeProperties() got the algorithm right, but using regular expressions to match OGNL expressions is painful. The attached patches add support for wildcard patterns to JSONResult and JSONInterceptor, and update JSONInterceptor.setIncludeProperties() to use the correct algorithm.

      The patches also add include/exclude support to JSONCleaner, to support filtering on the input data. (Configuration for JSONInterceptor and JSONResult only handle output filtering.)

      There are also a couple of code clean-up changes, to eliminate code duplication.

      Attachments

        1. patch1
          10 kB
          John Lindal
        2. patch2
          7 kB
          John Lindal
        3. patch3
          5 kB
          John Lindal
        4. patch4
          2 kB
          John Lindal
        5. WildcardUtil.java
          2 kB
          John Lindal

        Activity

          People

            jafl John Lindal
            jafl5272 John Lindal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: