Robert Munteanu wrote> Hi Carsten> > Thanks for the extensive write-up,
it took some time to digest :-)

:)

> 
> I have a couple of questions based on who we currenly can (or can't)
> use the provisioning model.
> 
> 1. How can we add comments to a feature or application json file? AFAIK
> JSON does not allow comments
> 

Right, strict JSON does not allow it, but we allow comments and the JSON
is preprocessed by a JSMin like processor. But after reading all
comments are gone, which I think is fine.

> 2. Reading the section on configuration merging, it is not clear to me
> if merging is merging of values or overriding of values.
> 
> Consider
> 
> 
> feature 1:
> 
> com.foo.bar.Service
>   prop1="A"
>   prop2="B"
> 
> feature 2:
> 
> com.foo.bar.Service
>   prop1="C"
> 
> 
> After the merge, will the configuration define the prop2 property? 

Yes, values get overwritten.

> 
> 
> 3. How are floating-point values represented? We had some issues with
> the provisioning model, see https://issues.apache.org/jira/browse/SLING
> -5914 .

Good question, I guess like you normally do in JSON :)

> 
> Ideally we'd be able to specify a value of "5.5" have have it work
> instead of the internal config admin formats.

Right, for configurations we use the specified format, so if you say

"propF" : 5.5

This should be fine. I don't know from the top of my head if this is a
float or a double. But you can also do

"propF:float" : 5.5

and then it will be converted into a float.
Even

"propF:float" : "5.5"

would do

It's internally using the OSGi converter for conversion.

So we're much safer with all these things.

Regards
Carsten

> 
> Thanks,
> 
> Robert
> 
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org

Reply via email to