Added the toJSON function to the Stencil benchmark.