Code:
import json
from json import JSONDecoder
from json import JSONEncoder
class PrintJSON(object):
name = None
pass
printJson = PrintJSON()
printJson.name = "This is test"
jd = JSONDecoder()
print(jd.decode(str(printJson)))
But getting error:-
Traceback (most recent call last):
File "C:/Users/jagdeep/test/json_test2.py",
Leave a comment: