You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Robert Hailey (JIRA)" <ji...@apache.org> on 2014/06/06 19:16:03 UTC

[jira] [Created] (TAP5-2349) JSONObject (& JSONArray) should not be final, to allow json-based type safety that interacts well with Tapestry

Robert Hailey created TAP5-2349:
-----------------------------------

             Summary: JSONObject (& JSONArray) should not be final, to allow json-based type safety that interacts well with Tapestry
                 Key: TAP5-2349
                 URL: https://issues.apache.org/jira/browse/TAP5-2349
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.4
            Reporter: Robert Hailey



For example, one might want to make a special type to communicate with the client-side page:

{noformat}
class AlertMessage extends JSONObject
{
    AlertMessage() { put("type", "alert"); }

    public void withMessage(String message)
    {
        put("message", message);
    }
}
{noformat}

...such would minimize the proliferation of the field name strings, allow passing custom json-backed types to various pages & services, etc.




--
This message was sent by Atlassian JIRA
(v6.2#6252)