Skip to content

api's json objects contain invalid keywords #5

@tomjack

Description

@tomjack

E.g.:

user> (f/facets :restaurants-us {:select "cuisine"
                                 :filters {"locality" "New York"
                                           "region" "NY"}
                                 :limit 50})
{:cuisine
 {;; ...
  :pizza, sandwiches, subs 29,
  ;; ...
  }}

Note that the keywords contain spaces and commas. This looks weird, isn't readable (by the reader, I mean), and is somewhat difficult to work with. I think Strings make more sense here.

It seems clj-http can be made to return strings using :as :json-string-keys, but that causes an error here. Not sure why. Maybe oauth-clj is getting in the way? Of course the tradeoff would be that you get strings even in places where keywords would be appropriate. Hmm...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions