[ https://issues.apache.org/jira/browse/WW-4034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16161336#comment-16161336 ]
ASF GitHub Bot commented on WW-4034: ------------------------------------ GitHub user yasserzamani opened a pull request: https://github.com/apache/struts/pull/167 WW-4034 Allows to use custom JSONwriter Wow! I really enjoyed this work! thanks to S2's nice design! Just a small query about documenting it please. While documentations are in a middle of transition now and JSON plugin not transited for now, could I create a pull request on struts-site or I should wait for completion of transitions? You can merge this pull request into a Git repository by running: $ git pull https://github.com/yasserzamani/struts WW-4034 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/struts/pull/167.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #167 ---- commit 39bdb99a116080a56242dc33303c4ab6d2b28f8f Author: Yasser Zamani <yasser.zam...@live.com> Date: 2017-09-11T13:39:32Z WW-4034 Refactors and extracts interface from JSONWriter commit 5bb472fa8585fddb38767dd4752a50cd5f51ff61 Author: Yasser Zamani <yasser.zam...@live.com> Date: 2017-09-11T14:10:34Z WW-4034 Allows to use custom JSONwriter ---- > 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)