[
https://issues.apache.org/jira/browse/WW-4034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16276396#comment-16276396
]
Hudson commented on WW-4034:
----------------------------
SUCCESS: Integrated in Jenkins build Struts-examples-JDK8-master #69 (See
[https://builds.apache.org/job/Struts-examples-JDK8-master/69/])
WW-4034 Example for customizing JSONWriter (yasserzamani: rev
d482811ab8cad7f69520e63c3b51fe068e12cd1c)
* (add) json-customize/src/main/resources/struts.xml
* (add) json-customize/src/main/java/org/demo/FlexJSONWriter.java
* (add) json-customize/src/main/webapp/WEB-INF/index.jsp
* (add) json-customize/src/main/java/org/demo/Zipcode.java
* (add) json-customize/src/main/webapp/WEB-INF/web.xml
* (edit) pom.xml
* (add) json-customize/src/main/java/org/demo/Person.java
* (add) json-customize/src/main/java/org/demo/ExcludeTransformer.java
* (add) json-customize/pom.xml
* (add) json-customize/src/main/resources/log4j2.xml
* (add) json-customize/src/main/java/org/demo/Phone.java
* (add) json-customize/src/main/java/org/demo/Address.java
* (add) json-customize/src/main/java/org/demo/ProduceAction.java
* (add) json-customize/src/main/java/org/demo/PasswordTransformer.java
* (add) json-customize/src/main/java/org/demo/User.java
> 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
>
>
> 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)