Added conversion to JSON