Python script converts Object to JSON