vaidik / commentjson

Add JavaScript or Python style comments in JSON.
MIT License
104 stars 25 forks source link

Fix for issue/8 and s/xrange/enumerate/ #9

Closed a8 closed 9 years ago

a8 commented 9 years ago

Hi,

Hope this fixes https://github.com/vaidik/commentjson/issues/8 and doesn't introduce new bugs. It comes with test json files.

I also replaced the for index in xrange(list(lines)) to enumerate(lines) which I find more readable. Doesn't change functionality. If you don't like it I'll send you a pull request for the 1st commit only.

F.

a8 commented 9 years ago

May I ask if this code is still maintained? No offence but there are folks using it and suffering from bugs like that. With great code comes great responsibility ;-).

vaidik commented 9 years ago

@a8 So true. Really sorry about not being able to look at your PR. Been a bit busy and yes I have not been able to work on this. But knowing that people are using this code gives me motivation to be more careful. Thanks so much for that :)

vaidik commented 9 years ago

Thanks for the fix @a8 :)

a8 commented 9 years ago

@vaidik no worries. Thanks for pulling. Yes, people use it :-), a lot actually since it solves a nagging problem.