To append key-value pairs to a json string, you can use dict.update: dictA.update(dictB)
.
For your case, this will look like this:
dictA = json.loads(jsonStringA)
dictB = json.loads('{"error_1395952167":"Error Occured on machine h1 in datacenter dc3 on the step2 of process test"}')
dictA.update(dictB)
jsonStringA = json.dumps(dictA)
Note that key collisions will cause values in dictB
overriding dictA
.