You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org> on 2014/06/06 22:19:03 UTC
[jira] [Updated] (TAP5-2349) JSONObject (& JSONArray) should not be
final, to allow json-based type safety that interacts well with Tapestry
[ https://issues.apache.org/jira/browse/TAP5-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thiago H. de Paula Figueiredo updated TAP5-2349:
------------------------------------------------
Description:
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.
was:
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.
Priority: Minor (was: Major)
Issue Type: New Feature (was: Bug)
Wouldn't in this case to use a POJO and Jackson Mapper to map it to JSONObject? I fail to see why pass JSON-backed types to services would be a good thing.
Marking it as a improvement, as there's no bug involved.
> 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: New Feature
> Components: tapestry-core
> Affects Versions: 5.4
> Reporter: Robert Hailey
> Priority: Minor
> Labels: json
>
> 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)