Adds tojson method to TimeRange and Update objects