You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/10/13 05:41:02 UTC

[jira] [Commented] (WW-4034) Allow to use custom JSONwriter

    [ https://issues.apache.org/jira/browse/WW-4034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16203082#comment-16203082 ] 

ASF GitHub Bot commented on WW-4034:
------------------------------------

lukaszlenart closed pull request #167: WW-4034 Allows to use custom JSONwriter
URL: https://github.com/apache/struts/pull/167
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Allow to use custom JSONwriter
> ------------------------------
>
>                 Key: WW-4034
>                 URL: https://issues.apache.org/jira/browse/WW-4034
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - JSON
>            Reporter: Emir Buğra KÖKSALAN
>            Priority: Minor
>              Labels: JSON
>             Fix For: 2.5.14, 2.6
>
>
> 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:
> {code:java}
> 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("}");
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)