json_output_create.cpp 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. #include "json_output_create.h"
  2. #include "config.h"
  3. #include "json_writer_output.h"
  4. #include "json_value_output.h"
  5. namespace NProtobufJson {
  6. TJsonMapOutputPtr CreateJsonMapOutput(IOutputStream& out, const NJson::TJsonWriterConfig& config) {
  7. return MakeHolder<TJsonWriterOutput>(&out, config);
  8. }
  9. TJsonMapOutputPtr CreateJsonMapOutput(NJson::TJsonWriter& writer) {
  10. return MakeHolder<TBaseJsonWriterOutput>(writer);
  11. }
  12. TJsonMapOutputPtr CreateJsonMapOutput(TString& str, const TProto2JsonConfig& config) {
  13. return MakeHolder<TJsonStringWriterOutput>(&str, config);
  14. }
  15. TJsonMapOutputPtr CreateJsonMapOutput(TStringStream& out, const TProto2JsonConfig& config) {
  16. return MakeHolder<TJsonWriterOutput>(&out, config);
  17. }
  18. TJsonMapOutputPtr CreateJsonMapOutput(IOutputStream& out, const TProto2JsonConfig& config) {
  19. return MakeHolder<TJsonWriterOutput>(&out, config);
  20. }
  21. TJsonMapOutputPtr CreateJsonMapOutput(NJson::TJsonValue& json) {
  22. return MakeHolder<TJsonValueOutput>(json);
  23. }
  24. }