Skip to content

Configurable JSON backend #1453

Description

@kirillkaiumov

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:

  1. Do you think it's a good idea to allow configuring the built-in middleware to work with different JSON backends?
  2. 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?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions