Added a helper method to convert the Benchmark object to a JSON object.