| 906 | } |
| 907 | |
| 908 | Result<const RjArray> GetMemberArray(const RjObject& obj, const std::string& key, |
| 909 | bool allow_absent = false) { |
| 910 | static const auto empty_array = rj::Value(rj::kArrayType); |
| 911 | |
| 912 | const auto& it = obj.FindMember(key); |
| 913 | if (allow_absent && it == obj.MemberEnd()) { |
| 914 | return empty_array.GetArray(); |
| 915 | } |
| 916 | RETURN_NOT_ARRAY(key, it, obj); |
| 917 | return it->value.GetArray(); |
| 918 | } |
| 919 | |
| 920 | Result<TimeUnit::type> GetMemberTimeUnit(const RjObject& obj, const std::string& key) { |
| 921 | ARROW_ASSIGN_OR_RAISE(const auto unit_str, GetMemberString(obj, key)); |
no test coverage detected