use deepcopy in to_json
Merge pull request #32 from dannyroberts/deepcopy-json

use deepcopy in to_json