to_json x | is_double x     = Number x
          | is_int    x     = Number x
to_json x | is_double x     = Number x
          | is_int    x     = Number x
to_json x | is_double x     = Number x
          | is_int    x     = Number x