Error in python package
Question: I started a script which retrieves a value from a JSON object using python but
am getting these errors

    
    
    File "c:\Python33\lib\json\__init__.py", line 319, in loads
    return _default_decoder.decode(s)
    File "c:\Python33\lib\json\decoder.py", line 352, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "c:\Python33\lib\json\decoder.py", line 368, in raw_decode
    obj, end = self.scan_once(s, idx)
    

my code is as follows:

    
    
    #!/usr/bin/env python
    import json
    data=json.loads('{WARRANTY:"",ROOT_CATEGORYNAME:"Automobiles",}')
    print data['ROOT_CATEGORYNAME']
    


Answer: What you have here may be a valid JavaScript literal, but that does NOT make
it valid JSON. In valid JSON all of the keys need to be quoted, and there
cannot be a trailing comma after the last element in an object or array.

In this case, the same information would look like this as JSON:

    
    
    data=json.loads('{"WARRANTY":"","ROOT_CATEGORYNAME":"Automobiles"}')
    

