I have a big old config object. Something like:
var object = {
item1: 'value1',
item2: 1000,
item3: ['a', 'b', 'c'],
item4: [1, 2, 3],
item5: {
foo: 'bar'
}
};
... and so on. I want to rewrite it as valid JSON so it can travel through the intertubes, but I don't want to go through every line in my file manually adding double quotes all over the place. Of course, I don't mind manually wrapping the whole thing in brackets and changing the initial assignment to be the first property, but beyond that I was hoping there's some resource that will do the grunt work.
Anyway, please help me out if know of a TextMate command, regex trick, online converter, friendly robot, or anything else that will make this less tedious.