aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/types/binary_json/write.h
blob: 61dea9bfb40dcf5469fcd6bd64985c73b5aa0f2c (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
#pragma once

#include "format.h"

#include <util/generic/maybe.h>

#include <variant>

namespace NYql::NUdf {
class TUnboxedValue;
};

namespace NKikimr::NBinaryJson {

/**
 * @brief Translates textual JSON into BinaryJson
 */
std::variant<TBinaryJson, TString> SerializeToBinaryJson(const TStringBuf json, bool allowInf = false);

/**
 * @brief Translates DOM layout from `yql/library/dom` library into BinaryJson
 */
TBinaryJson SerializeToBinaryJson(const NYql::NUdf::TUnboxedValue& value);
}