def normalize_json(json)
      json = json.to_json unless json.is_a?(String)
      JSON.parse(json)
    end
def normalize_json(json)
      json = json.to_json unless json.is_a?(String)
      JSON.parse(json)
    end
normalizes datetime objects to strings etc. more similar to what the client would see.