lidavidm commented on code in PR #85:
URL: https://github.com/apache/iceberg-cpp/pull/85#discussion_r2056113117


##########
src/iceberg/json_internal.cc:
##########
@@ -1209,4 +1209,20 @@ Result<std::unique_ptr<TableMetadata>> 
TableMetadataFromJson(const nlohmann::jso
   return table_metadata;
 }
 
+Result<nlohmann::json> FromJsonString(const std::string& json_string) {
+  try {
+    return nlohmann::json::parse(json_string);
+  } catch (const std::exception& e) {

Review Comment:
   You can also call an overload that doesn't throw an exception, and 
explicitly check whether the resulting JSON object is `discarded()` (IIRC)



-- 
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

Reply via email to