You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Kevin Brown (JIRA)" <ji...@apache.org> on 2008/03/22 09:39:24 UTC

[jira] Closed: (SHINDIG-140) Add support for x-path like querying of json syndicator configuration files.

     [ https://issues.apache.org/jira/browse/SHINDIG-140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Brown closed SHINDIG-140.
-------------------------------

    Resolution: Fixed

> Add support for x-path like querying of json syndicator configuration files.
> ----------------------------------------------------------------------------
>
>                 Key: SHINDIG-140
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-140
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadgets Server - Java, Gadgets Server - PHP
>            Reporter: Kevin Brown
>
> Currently, querying a specific syndicator value server side is fairly tedious, at least in Java. You have to do things like this:
> // get the aliases for profile view
> JSONObject features = config.get(synd, "gadgets.features");
> if (features != null) {
>   views = features.get("views");
>   if (views != null) {
>     JSONObject profile = views.get("profile");
>     if (profile != null) {
>       return profile.get("aliases");
>     }
>   }
> }
> It's quite a bit cleaner in PHP.
> To remedy this, I'd like to see the following syntax supported:
> JSONArray aliases = syndicator.getJsonArray(synd, "gadgets.features.views.profile.aliases");
> This requires two changes:
> 1. Support the object notation splitting and lookup (split on the "." separator)
> 2. Modify the structure of syndicator configuration slightly to remove dots in existing property names. This requires that the PHP code be modified slightly as well.
> 3. Rename core.io and core.util configuration to either "core-io" and "core-util" or just "io" and "util". I have a slight preference for the latter.
> The syndicator configuration files should wind up looking something like this, ideally:
> {"syndicators" : ["default", "alias"],
>   "gadgets" : {
>     "parentUrl" : "...",
>     "features" : {...}
> }
> It might be prudent to retain support for settings declared as "foo.bar", but I think that the logic required to support that is too complex and we'd be better off just breaking compatibility here and upgrading whatever changes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.