MarshalJSON function for StandardRegistry

Makes it easier to send metrics data over HTTP.