Closed
Description
Feature Request
I'm trying to use input_adapter to wrap an Apache Thrift Transport (the details aren't really relevant). To that end, I need to provide the json::parse() function my own subclass of input_adapter_protocol, instead of an input_adapter. I'm happy to send a PR, but figured I should at least first check that this isn't something foolish, or something that can be achieved in another way? It was extremely straightforward to make my own subclass of input_adapter_protocol, btw.
modified src/lib/cpp/json.hpp
@@ -1562,6 +1562,8 @@ class input_adapter
public:
// native support
+ explicit input_adapter(input_adapter_t arg_ia) : ia(arg_ia) { }
+
/// input adapter for input stream
input_adapter(std::istream& i)
: ia(std::make_shared<cached_input_stream_adapter<16384>>(i)) {}