You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2013/11/28 12:51:35 UTC
[jira] [Commented] (TAP5-2242) json: binding prefix
[ https://issues.apache.org/jira/browse/TAP5-2242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13834755#comment-13834755 ]
Jochen Kemnade commented on TAP5-2242:
--------------------------------------
Couldn't you just use {code}literal:{foo:'value1', bar:'value2'}{code} and {{TypeCoercer}} would take care of the rest? There are coercions from {{String}} to {{JSONObject}} and {{JSONArray}} defined in {{org.apache.tapestry5.json.modules.JSONModule}}.
> json: binding prefix
> --------------------
>
> Key: TAP5-2242
> URL: https://issues.apache.org/jira/browse/TAP5-2242
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-json
> Reporter: Lance
> Priority: Minor
>
> It would be nice to have a JSON binding prefix.
> eg:
> {code}
> <t:someComponent
> jsonObject="json:{foo:'value1', bar:'value2'}"
> jsonArray="json:['foo','bar']"
> />
> {code}
> This would likely require a check for the first character as a '{' will create a JSONObject whereas a '[' will create a JSONArray.
--
This message was sent by Atlassian JIRA
(v6.1#6144)