I'm sorry to reply to my own post, but here's a simpler solution: Return "return {" on the first call to the reader. For each input line, return "{" plus the line plus "},". At the end, return "}". --lhf