iceberg-cpp
Loading...
Searching...
No Matches
Macros | Functions
json_serde_internal.h File Reference
#include <memory>
#include <unordered_map>
#include <vector>
#include <nlohmann/json_fwd.hpp>
#include "iceberg/catalog/rest/iceberg_rest_export.h"
#include "iceberg/catalog/rest/types.h"
#include "iceberg/result.h"
#include "iceberg/type_fwd.h"

Go to the source code of this file.

Macros

#define ICEBERG_DECLARE_JSON_SERDE(Model)
 

Functions

template<typename Model >
Result< Model > iceberg::rest::FromJson (const nlohmann::json &json)
 
Result< LoadTableResulticeberg::rest::LoadTableResultFromJson (const nlohmann::json &json)
 
template<>
ICEBERG_REST_EXPORT Result< LoadTableResulticeberg::rest::FromJson (const nlohmann::json &json)
 
Result< nlohmann::json > iceberg::rest::ToJson (const LoadTableResult &result)
 
Result< CreateTableRequesticeberg::rest::CreateTableRequestFromJson (const nlohmann::json &json)
 
template<>
ICEBERG_REST_EXPORT Result< CreateTableRequesticeberg::rest::FromJson (const nlohmann::json &json)
 
Result< nlohmann::json > iceberg::rest::ToJson (const CreateTableRequest &request)
 
Result< CommitTableRequesticeberg::rest::CommitTableRequestFromJson (const nlohmann::json &json)
 
template<>
ICEBERG_REST_EXPORT Result< CommitTableRequesticeberg::rest::FromJson (const nlohmann::json &json)
 
Result< nlohmann::json > iceberg::rest::ToJson (const CommitTableRequest &request)
 
Result< CommitTableResponseiceberg::rest::CommitTableResponseFromJson (const nlohmann::json &json)
 
template<>
ICEBERG_REST_EXPORT Result< CommitTableResponseiceberg::rest::FromJson (const nlohmann::json &json)
 
Result< nlohmann::json > iceberg::rest::ToJson (const CommitTableResponse &response)
 
Result< PlanTableScanResponseiceberg::rest::PlanTableScanResponseFromJson (const nlohmann::json &json, const std::unordered_map< int32_t, std::shared_ptr< PartitionSpec > > &partition_specs_by_id, const Schema &schema)
 
Result< nlohmann::json > iceberg::rest::ToJson (const PlanTableScanResponse &response, const std::unordered_map< int32_t, std::shared_ptr< PartitionSpec > > &partition_specs_by_id, const Schema &schema)
 
Result< FetchPlanningResultResponseiceberg::rest::FetchPlanningResultResponseFromJson (const nlohmann::json &json, const std::unordered_map< int32_t, std::shared_ptr< PartitionSpec > > &partition_specs_by_id, const Schema &schema)
 
Result< nlohmann::json > iceberg::rest::ToJson (const FetchPlanningResultResponse &response, const std::unordered_map< int32_t, std::shared_ptr< PartitionSpec > > &partition_specs_by_id, const Schema &schema)
 
Result< FetchScanTasksResponseiceberg::rest::FetchScanTasksResponseFromJson (const nlohmann::json &json, const std::unordered_map< int32_t, std::shared_ptr< PartitionSpec > > &partition_specs_by_id, const Schema &schema)
 
Result< nlohmann::json > iceberg::rest::ToJson (const FetchScanTasksResponse &response, const std::unordered_map< int32_t, std::shared_ptr< PartitionSpec > > &partition_specs_by_id, const Schema &schema)
 
Result< PlanTableScanRequesticeberg::rest::PlanTableScanRequestFromJson (const nlohmann::json &json)
 
template<>
ICEBERG_REST_EXPORT Result< PlanTableScanRequesticeberg::rest::FromJson (const nlohmann::json &json)
 
Result< nlohmann::json > iceberg::rest::ToJson (const PlanTableScanRequest &request)
 
Result< FetchScanTasksRequesticeberg::rest::FetchScanTasksRequestFromJson (const nlohmann::json &json)
 
template<>
ICEBERG_REST_EXPORT Result< FetchScanTasksRequesticeberg::rest::FromJson (const nlohmann::json &json)
 
nlohmann::json iceberg::rest::ToJson (const FetchScanTasksRequest &request)
 
Result< nlohmann::json > iceberg::rest::ToJson (const DataFile &data_file, const std::unordered_map< int32_t, std::shared_ptr< PartitionSpec > > &partition_specs_by_id, const Schema &schema)
 
Result< DataFileiceberg::rest::DataFileFromJson (const nlohmann::json &json, const std::unordered_map< int32_t, std::shared_ptr< PartitionSpec > > &partition_spec_by_id, const Schema &schema)
 
Result< std::vector< std::shared_ptr< FileScanTask > > > iceberg::rest::FileScanTasksFromJson (const nlohmann::json &json, const std::vector< std::shared_ptr< DataFile > > &delete_files, const std::unordered_map< int32_t, std::shared_ptr< PartitionSpec > > &partition_spec_by_id, const Schema &schema)
 

Detailed Description

JSON serialization and deserialization for Iceberg REST Catalog API types.

Macro Definition Documentation

◆ ICEBERG_DECLARE_JSON_SERDE

#define ICEBERG_DECLARE_JSON_SERDE (   Model)
Value:
ICEBERG_REST_EXPORT Result<Model> Model##FromJson(const nlohmann::json& json); \
\
template <> \
ICEBERG_REST_EXPORT Result<Model> FromJson(const nlohmann::json& json); \
\
ICEBERG_REST_EXPORT nlohmann::json ToJson(const Model& model);

Function Documentation

◆ LoadTableResultFromJson()

ICEBERG_REST_EXPORT Result< LoadTableResult > iceberg::rest::LoadTableResultFromJson ( const nlohmann::json &  json)
Note
Don't forget to add ICEBERG_DEFINE_FROM_JSON to the end of json_internal.cc to define the FromJson function for the model.