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

Allow to use custom JSONwriter

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.5.14
    • Plugin - JSON

    Description

      Throws when accessing to a private inner class in that method:

      private void map(Map map, Method method) throws JSONException

      May be pass when trying to access a private class. example source code should be:

      private void map(Map map, Method method) throws JSONException {
          this.add("{");
      ...
          while (it.hasNext()) {
              Map.Entry entry = (Map.Entry) it.next();
              Object key = entry.getKey();
              String expr = null;
              if (this.buildExpr) {
                  try {
                      if (key == null) {
                          LOG.error("Cannot build expression for null key in " + this.exprStack);
                          continue;
                      } else {
                          expr = this.expandExpr(key.toString());
                          if (this.shouldExcludeProperty(expr)) {
                              continue;
                          }
                          expr = this.setExprStack(expr);
                      }
                  }
                  catch (Exception ex) {
                      LOG.error("Error: " + ex.getLocalizedMessage());
                      continue;
                  }
              }
              if (hasData) {
                  this.add(',');
              }
      ...
          this.add("}");
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kodmanyagha Emir Buğra KÖKSALAN
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: