aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/json/json_output_create.cpp
blob: 7c84c97e76d75e0783c99825596f92c621d24ab1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "json_output_create.h"

#include "config.h"
#include "json_writer_output.h"
#include "json_value_output.h"

namespace NProtobufJson {
    TJsonMapOutputPtr CreateJsonMapOutput(IOutputStream& out, const NJson::TJsonWriterConfig& config) { 
        return MakeHolder<TJsonWriterOutput>(&out, config);
    } 

    TJsonMapOutputPtr CreateJsonMapOutput(NJson::TJsonWriter& writer) { 
        return MakeHolder<TBaseJsonWriterOutput>(writer);
    } 

    TJsonMapOutputPtr CreateJsonMapOutput(TString& str, const TProto2JsonConfig& config) { 
        return MakeHolder<TJsonStringWriterOutput>(&str, config);
    } 

    TJsonMapOutputPtr CreateJsonMapOutput(TStringStream& out, const TProto2JsonConfig& config) { 
        return MakeHolder<TJsonWriterOutput>(&out, config);
    } 

    TJsonMapOutputPtr CreateJsonMapOutput(IOutputStream& out, const TProto2JsonConfig& config) { 
        return MakeHolder<TJsonWriterOutput>(&out, config);
    } 

    TJsonMapOutputPtr CreateJsonMapOutput(NJson::TJsonValue& json) { 
        return MakeHolder<TJsonValueOutput>(json);
    } 

}