struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Othon Crelier (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (WW-4034) Allow to use custom JSONwriter
Date Thu, 29 Oct 2015 17:30:27 GMT

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

Othon Crelier edited comment on WW-4034 at 10/29/15 5:29 PM:
-------------------------------------------------------------

Further explaining, my model has plenty of Jackson annotations such as @JsonIgnore in Lazy
JPA properties. And JSONWriter simply won't respect them.


was (Author: othon2000):
Further explaining, my model has plenty of Jackson annotations such as @JsonIgnore in Lazy
properties. And JSONWriter simply won't respect them.

> 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
>             Fix For: 2.5
>
>
> 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.3.4#6332)

Mime
View raw message