If I throw the following into a variable:

 <set variable="q.m">
  <json-parse>
   {"0":55,
    "1":"Foo"
   }
  </json-parse>
 </set>

It results in:
m=([ /* 2 elements */
  "0": 55,
  "1": "Foo",
])

The trouble is, when trying to access this using:
  &q.m.0; or &q.m.1;
does not work, because it interprets the 0 and the 1 as integers, and looks
for the integer key 0 and 1 in the mapping (which is not present, obviously).

How to work around this?
My first thought was to change Roxen to check for string keys as well as
integer keys when retrieving (and then make one of them leading).
Because, currently, it already does magic the other way around (it prefers
the integer version if it is a number, and uses the string index key if
it is not a number).

Trying to find the spot where this is done is not so easy, though.
Any hints?  I looked at server/etc/modules/Variable.pmod/module.pmod
Or other thoughts?
-- 
Stephen.

Skiing beyond this point may result in death and/or loss of skiing privileges.

Reply via email to