spree_api/rabl escapes doubleqoutes in jsonp response

117 Views Asked by At

When I make a request to a spree 2.2.0 API (rabl gem version 0.8.4) to

domain.com/api/products

I get

{"count":25,"total_count":26,"current_page":1,"pages":2,"variants":[{"id":1,"name":"Ruby on Rails Tote","sku":"ROR-00011",...  And so on

Same thing with JSONP Callback like

domain.com/api/products?callback=test

gives me

test(["{\"count\":25,\"total_count\":26,\"current_page\":1,\"pages\":2,\"variants\":[{... And so on

Does anyone have had that strange escaping behaviour before? Any clues, how to get an unescaped response?

1

There are 1 best solutions below

0
On BEST ANSWER

After opening an Issue on github, the problem is now resolved: https://github.com/spree/spree/issues/4332