Sep-22-2019, 06:26 PM
In essence, it just boils down to making a JSON object where the keys are the field names (and so the values are, well, the field values). If you can make a dictionary in that form, you can just use
json.dumps
to produce a string containing the JSON representation.