Closed GoogleCodeExporter closed 9 years ago
I've modifed the post_parse method in rsonmac.py. My changes to work for my
case, but I'm not sure if there are cases where it would fail. Here is the new
function:
@staticmethod
def post_parse(tokens, value):
if isinstance(value,list):
iterant = range(0,len(value))
elif isinstance(value,dict):
iterant = value.keys()
for i in iterant:
if isinstance(value[i],MacroProxy):
value[i] = value[i].dereference()
elif (isinstance(value[i],dict) or isinstance(value[i],list)):
value[i] = RsonMacros.post_parse(None,value[i])
return value
Thanks,
Brad
Original comment by bradlcam...@gmail.com
on 12 Apr 2012 at 7:45
I think the problem was just with the first element of the array.
I have checked in a fix to rsonmac.py. Please try this and close the issue if
it works for you.
Thanks,
Pat
Original comment by pmaupin
on 12 Apr 2012 at 7:52
Beautiful. Thanks!
Original comment by bradlcam...@gmail.com
on 12 Apr 2012 at 8:18
Glad I could help. Thanks for using RSON. Since you seem happy, I'll mark the
fix as verified.
Original comment by pmaupin
on 12 Apr 2012 at 8:27
Original issue reported on code.google.com by
bradlcam...@gmail.com
on 12 Apr 2012 at 6:53