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


##########
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:
   I agree that the official documentation says it only throws `parse_error`. I 
just want to be safe enough to catch all just in case. Or we can add a special 
branch for `parse_error` for better error message.



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