Created custom JSON serializing method for Snapshot class.