Currently faraday provides a middleware to encode/decode JSON payloads. Internally it uses json that from the Ruby's standard library. If I want to use another JSON backend like oj then I need to implement my own middleware. So, I have a few questions:
Do you think it's a good idea to allow configuring the built-in middleware to work with different JSON backends?
If I want to make my own middleware to use oj, can I make it inherit from Faraday::Response::Json class? Or it's considered "private" and better to inherit from Faraday::Middleware?
Currently
faraday
provides a middleware to encode/decode JSON payloads. Internally it usesjson
that from the Ruby's standard library. If I want to use another JSON backend like oj then I need to implement my own middleware. So, I have a few questions:oj
, can I make it inherit fromFaraday::Response::Json
class? Or it's considered "private" and better to inherit fromFaraday::Middleware
?Thanks!