can you expand to include an explanation of what the code is doing? — WindRaven35 mins ago
Um, it reads one line at a time from the source file, and writes to the target file each line that doesn't contain the string "Presence Manager"? The conditional statement in the while is shorthand for "read the next line, but also check for end of file." — Robert Harvey26 mins ago
Hello! I wonder what does it mean to "SO Ready To Help" ? when somebody has that on their profile. Is it on "offical" SO team or just a loose expression for a programmer willing to help someone?
http://stackoverflow.com/10m has this suggestion (last line):
Not a fan of teh twitters? No problem. Just add #SOreadytohelp to your
"About Me" on your profile page.
(I am not a fan of teh twitters.) But doing so looks ... ahem ... silly:
http://stackoverflow.com/users/939860/erwin-brands...
OK, I must be really dumb these past couple of days. I can't figure out why I'm only ever getting the first record in this JSON file. I would totally implement some kind of looping if I had any idea how I was supposed to do that, but everything I've read doesn't seem to think that's necessary, so maybe my file isn't formatted properly?
Well, that's why I figured I'd write a little script for it. I need to do it as often as I need to do it. It will probably be more than once, less than one hundred times.
I'd be more suspicious of the parser. But I'd look at bug reports against the tools that create it, too. I'd have to read about what JSON needs for an array. You shouldn't have to even have a script, if you are using two off-the-shelf tools to produce and then read the JSON.
Well if that is the case then it explains why the JSOn parser was stopping after one object
If this is only happening at the highest level in the JSON structure then you could just pass each line of the file to the parser separately and build it up that way. If that format is repeated at multiple levels in the JSON structure then I guess you will have to correct the syntax.
Well, first class objects are better, but not if you're always running out of memory. And the text parsing problem here shouldn't be all that difficult.
By 'line breaks in bad places' do you mean newline characters as part of a text blob?
If so then when you are reading the file line by line you'll need to check that the line ending has a curly brace }. If not then read the next line as well, etc.
today seems to be the day of blatant software recommendations. Two questions waiting for votes down and close: 1, 2 and two - for votes down and delete: 3, 4