zhjwpku commented on code in PR #75: URL: https://github.com/apache/iceberg-cpp/pull/75#discussion_r2045922052
########## src/iceberg/json_internal.h: ########## @@ -74,44 +76,32 @@ Result<std::unique_ptr<SortOrder>> SortOrderFromJson(const nlohmann::json& json) /// /// \param[in] schema The Iceberg schema to convert. /// \return The JSON representation of the schema. -nlohmann::json SchemaToJson(const Schema& schema); - -/// \brief Convert an Iceberg Type to JSON. -/// -/// \param[in] type The Iceberg type to convert. -/// \return The JSON representation of the type. -nlohmann::json TypeToJson(const Type& type); - -/// \brief Convert an Iceberg SchemaField to JSON. -/// -/// \param[in] field The Iceberg field to convert. -/// \return The JSON representation of the field. -nlohmann::json FieldToJson(const SchemaField& field); - -/// \brief Serializes a `SnapshotRef` object to JSON. -/// -/// \param[in] snapshot_ref The `SnapshotRef` object to be serialized. -/// \return A JSON object representing the `SnapshotRef`. -nlohmann::json ToJson(const SnapshotRef& snapshot_ref); - -/// \brief Serializes a `Snapshot` object to JSON. -/// -/// \param[in] snapshot The `Snapshot` object to be serialized. -/// \return A JSON object representing the `snapshot`. -nlohmann::json ToJson(const Snapshot& snapshot); +nlohmann::json ToJson(const Schema& schema); /// \brief Convert JSON to an Iceberg Schema. /// /// \param[in] json The JSON representation of the schema. /// \return The Iceberg schema or an error if the conversion fails. Result<std::unique_ptr<Schema>> SchemaFromJson(const nlohmann::json& json); +/// \brief Convert an Iceberg Type to JSON. Review Comment: nit: should we stick to the same doc pattern, `Serializes a 'xxx' object to JSON`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org