class Appsignal::Utils::JSON
def jsonify(value)
def jsonify(value) case value when String encode_utf8(value) when Numeric, NilClass, TrueClass, FalseClass value when Hash value.each_with_object({}) do |(k, v), hash| hash[jsonify(k)] = jsonify(v) end when Array value.map { |v| jsonify(v) } else jsonify(value.to_s) end end