Hi, in conference xml_list some tags has "_" but some use "-" "_" works well but "-" causing problems e.g. when convert to json it's ok to use conference.last_talking but to get the input-volume value it has to be conference["input-volume"], and in some other cased there's no such work around and I have to go through all tags and replace "-"s to "_"s. I understand "-" in xml is totally valid but would it be better to keep it consistent ? <last_talking>0</last_talking> <energy>300</energy> <volume_in>0</volume_in> <volume_out>0</volume_out> <output-volume>0</output-volume> <input-volume>0</input-volume> <auto-adjusted-input-volume>0</auto-adjusted-input-volume> Thanks. -- Seven Du Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
Typically we use _ for variables and - for params in config. - is still valid in json, you just need to reference it differently. Why would you do anything to modify them? On Sep 11, 2012, at 12:30 PM, Seven Du <dujinfang@gmail.com> wrote: Hi, in conference xml_list some tags has "_" but some use "-" "_" works well but "-" causing problems e.g. when convert to json it's ok to use conference.last_talking but to get the input-volume value it has to be conference["input-volume"], and in some other cased there's no such work around and I have to go through all tags and replace "-"s to "_"s. I understand "-" in xml is totally valid but would it be better to keep it consistent ? <last_talking>0</last_talking> <energy>300</energy> <volume_in>0</volume_in> <volume_out>0</volume_out> <output-volume>0</output-volume> <input-volume>0</input-volume> <auto-adjusted-input-volume>0</auto-adjusted-input-volume> Thanks. -- Seven Du Sent with Sparrow <http://www.sparrowmailapp.com/?sig> _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Yes, I understand it's valid json, and as in json there's a difference reference but in my special case I'm in erlang and using the erlydtl template and obviously conference.member.volume_in is valid but conference.member.input-volume is not. Well, it's not a big deal and I can go over all and replace all '-'s to '_'s before rendering to the template. Thanks. -- Seven Du Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Tuesday, September 25, 2012 at 7:58 PM, Michael Jerris wrote:
Typically we use _ for variables and - for params in config. - is still valid in json, you just need to reference it differently. Why would you do anything to modify them?
On Sep 11, 2012, at 12:30 PM, Seven Du <dujinfang@gmail.com (mailto:dujinfang@gmail.com)> wrote:
Hi,
in conference xml_list some tags has "_" but some use "-"
"_" works well but "-" causing problems e.g. when convert to json it's ok to use conference.last_talking but to get the input-volume value it has to be conference["input-volume"], and in some other cased there's no such work around and I have to go through all tags and replace "-"s to "_"s.
I understand "-" in xml is totally valid but would it be better to keep it consistent ?
<last_talking>0</last_talking> <energy>300</energy> <volume_in>0</volume_in> <volume_out>0</volume_out> <output-volume>0</output-volume> <input-volume>0</input-volume> <auto-adjusted-input-volume>0</auto-adjusted-input-volume>
Thanks.
-- Seven Du Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (mailto:consulting@freeswitch.org) http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org (mailto:FreeSWITCH-users@lists.freeswitch.org) http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (mailto:consulting@freeswitch.org) http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org (mailto:FreeSWITCH-users@lists.freeswitch.org) http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (2)
-
Michael Jerris
-
Seven Du