Hi Nuwan,

Yes, correct. Say I have an element that can have 3 values, ex:- "type" :
"SOME_VALUE", where SOME_VALUE can be "foo", "bar", "foobar". I want to
explain to a user what these three different values would mean. Is this a
result of some bad practice?

Thanks,
Senaka.

On Mon, Oct 29, 2012 at 12:11 AM, Nuwan Bandara <[email protected]> wrote:

> Hi Senaka,
>
> Well so far, we didn't have a requirement for comments in json, for me I
> feel its a self descriptive data structure. You cannot compare json with
> XML and try to replace everything we have in XML. If commenting is a must.
> yes of-cause you can have a comment element in a json object.
>
> Regards,
> /Nuwan
>
> On Sun, Oct 28, 2012 at 11:34 AM, Senaka Fernando <[email protected]> wrote:
>
>> Hi all,
>>
>> Yes, not being able to have comments is a serious miss in JSON AFAIU,
>> because there is no way to document alternative options as in the case of
>> XML. That's the reason why I asked what's our convention of adding
>> comments/documentation. Some people have used the "_comment" element. If
>> what Madhuka explains is the convention in Jaggery, we can follow that in
>> AM/GS/G-Reg etc.
>>
>> Thanks,
>> Senaka.
>>
>>
>> On Sun, Oct 28, 2012 at 11:24 PM, Nuwan Bandara <[email protected]> wrote:
>>
>>> Hi Senaka,
>>>
>>> there is no such thing called comments in JSON. :)
>>>
>>> Regards,
>>> /Nuwan
>>>
>>>
>>> On Sun, Oct 28, 2012 at 8:31 AM, Madhuka Udantha <[email protected]>wrote:
>>>
>>>> Hi,
>>>>
>>>> I don't believe we can have an actual comment in json[1]. The JSON
>>>> should all be data, and if you include a comment, then it will be data too.
>>>> In jaggery still it is same. We can have a designated data element called
>>>> "_comment".
>>>>
>>>> Here sample that you can try out.
>>>> eg:
>>>>
>>>> {
>>>> *"displayName_comment":"give the jaggery app name", *
>>>>  "displayName":"Coffee Shop",
>>>>     "urlMappings":[
>>>>  {
>>>>             "url":"/orders/*",
>>>>    * "url_comment":"Comments for url mapping on URL",*
>>>>             "path":"/controller/order.jag"
>>>>         }
>>>>
>>>>     ]
>>>> }
>>>>
>>>> It is drawback of json.
>>>>
>>>> References
>>>> [1] http://www.json.org/
>>>>
>>>> On Sun, Oct 28, 2012 at 1:30 PM, Senaka Fernando <[email protected]>wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> $subject?
>>>>>
>>>>> Thanks,
>>>>> Senaka.
>>>>>
>>>>> --
>>>>> *Senaka Fernando*
>>>>> Member - Integration Technologies Management Committee;
>>>>> Technical Lead; WSO2 Inc.; http://wso2.com*
>>>>> Member; Apache Software Foundation; http://apache.org
>>>>>
>>>>> E-mail: senaka AT wso2.com
>>>>> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
>>>>> Linked-In: http://linkedin.com/in/senakafernando
>>>>>
>>>>> *Lean . Enterprise . Middleware
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Madhuka* Udantha
>>>> http://madhukaudantha.blogspot.com/
>>>>
>>>>
>>>
>>>
>>> --
>>> *Thanks & Regards,
>>>
>>> Nuwan Bandara
>>> Associate Technical Lead & Member, MC, Development Technologies
>>> WSO2 Inc. - lean . enterprise . middleware |  http://wso2.com
>>> blog : http://nuwanbando.com; email: [email protected]; phone: +94 11 763
>>> 9629
>>> *
>>> <http://www.nuwanbando.com/>
>>>
>>
>>
>>
>> --
>> *Senaka Fernando*
>> Member - Integration Technologies Management Committee;
>> Technical Lead; WSO2 Inc.; http://wso2.com*
>> Member; Apache Software Foundation; http://apache.org
>>
>> E-mail: senaka AT wso2.com
>> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
>> Linked-In: http://linkedin.com/in/senakafernando
>>
>> *Lean . Enterprise . Middleware
>>
>>
>
>
> --
> *Thanks & Regards,
>
> Nuwan Bandara
> Associate Technical Lead & Member, MC, Development Technologies
> WSO2 Inc. - lean . enterprise . middleware |  http://wso2.com
> blog : http://nuwanbando.com; email: [email protected]; phone: +94 11 763
> 9629
> *
> <http://www.nuwanbando.com/>
>



-- 
*Senaka Fernando*
Member - Integration Technologies Management Committee;
Technical Lead; WSO2 Inc.; http://wso2.com*
Member; Apache Software Foundation; http://apache.org

E-mail: senaka AT wso2.com
**P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
Linked-In: http://linkedin.com/in/senakafernando

*Lean . Enterprise . Middleware
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to