rok commented on PR #50874: URL: https://github.com/apache/arrow/pull/50874#issuecomment-5395263902
With internal functions like sketched out [here](https://gist.github.com/rok/7b275f137e438aabc55fd70376ab967f) you could do something like: ```cpp simdjson::dom::parser parser; ARROW_ASSIGN_OR_RAISE(auto object, internal::ParseJsonObject(parser, serialized_data)); ARROW_ASSIGN_OR_RAISE(auto shape_value, internal::ResolveSimdjsonResult(object.at_key("shape"), "Invalid serialized JSON data")); ARROW_ASSIGN_OR_RAISE(auto shape, internal::GetJsonIntArray(shape_value, "shape")); ``` I'm not sure this is the best way to structure it, but it would reduce boilerplate a lot. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
