I've also offered a few python scripts from time to time that can do this effectively. They're all based on having the base JSON for something and some kind of input (like a CSV or formula) to populate the JSON.
import json
from StringIO import StringIO
baseItem = """{"xid":"DP_12345", "name":"%(name)s", "someKey":"%(someValue)s"}"""
csvFile = open("/path/to/csv")
output = {"items":[]}
for line in csvFile :
data = line.replace("\r", "").replace("\n", "").split(",")
output["items"].append( json.load( StringIO( baseItem % {"name": data[1], "someValue": data[2]} ) ) )
csvFile.close()
outputFile = open("/path/to/output.json", "w+")
outputFile.write(json.dumps(output, sort_keys=False, indent=4, separators=(",",": ")))
outputFile.close()