File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 3434namespace iceberg {
3535
3636Result<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
4545nlohmann::json ToJson (const Expression& expr) {
Original file line number Diff line number Diff line change @@ -33,13 +33,14 @@ namespace iceberg {
3333template <typename Model>
3434Result<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.
You can’t perform that action at this time.
0 commit comments