Skip to content

Commit 52e2501

Browse files
author
Innocent
committed
cleanup
1 parent dbda110 commit 52e2501

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/iceberg/expression/json_internal.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
namespace iceberg {
3535

3636
Result<std::shared_ptr<Expression>> ExpressionFromJson(const nlohmann::json& json) {
37-
// Handle boolean literals
37+
// Handle boolean
3838
if (json.is_boolean()) {
3939
return json.get<bool>() ? std::static_pointer_cast<Expression>(True::Instance())
4040
: std::static_pointer_cast<Expression>(False::Instance());
4141
}
42-
return JsonParseError("Only boolean literals are currently supported");
42+
return JsonParseError("Only boolean are currently supported");
4343
}
4444

4545
nlohmann::json ToJson(const Expression& expr) {

src/iceberg/expression/json_internal.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@ namespace iceberg {
3333
template <typename Model>
3434
Result<Model> FromJson(const nlohmann::json& json);
3535

36-
#define ICEBERG_DECLARE_JSON_SERDE(Model) \
37-
Result<std::shared_ptr<Model>> Model##FromJson(const nlohmann::json& json); \
38-
\
39-
template <typename Model> \
40-
Result<std::shared_ptr<Model>> FromJson(const nlohmann::json& json); \
41-
\
42-
nlohmann::json ToJson(const Model& model);
36+
#define ICEBERG_DECLARE_JSON_SERDE(Model) \
37+
ICEBERG_EXPORT Result<std::shared_ptr<Model>> Model##FromJson( \
38+
const nlohmann::json& json); \
39+
\
40+
template <typename Model> \
41+
ICEBERG_EXPORT Result<std::shared_ptr<Model>> FromJson(const nlohmann::json& json); \
42+
\
43+
ICEBERG_EXPORT nlohmann::json ToJson(const Model& model);
4344

4445
/// \note Don't forget to add `ICEBERG_DEFINE_FROM_JSON` to the end of
4546
/// `json_internal.cc` to define the `FromJson` function for the model.

0 commit comments

Comments
 (0)