No, It is Immpossible. To successfully parse this using simplejson, you first need to convert it to a valid JSON string.
Depending on how strict your input line format is, this can be quite simple or extremely complex.
For the simple case, if you always have a JSON object that has only letters and underscores in keys (without quotes) and integers as values, you can use the following to convert it to real JSON:
import re your_string = re.sub(r'([a-zA-Z_]+)', r'"\1"', your_string)
For instance:
>>> re.sub(r'([a-zA-Z_]+)', r'"\1"', '{foo:3, bar:4}') '{"foo":3, "bar":4}'
source share