| 442 | } |
| 443 | |
| 444 | Status AppendValue(const rj::Value& json_obj) override { |
| 445 | if (json_obj.IsNull()) { |
| 446 | return this->AppendNull(); |
| 447 | } |
| 448 | DayTimeIntervalType::DayMilliseconds value; |
| 449 | if (!json_obj.IsArray()) { |
| 450 | return JSONTypeError("array", json_obj.GetType()); |
| 451 | } |
| 452 | if (json_obj.Size() != 2) { |
| 453 | return Status::Invalid( |
| 454 | "day time interval pair must have exactly two elements, had ", json_obj.Size()); |
| 455 | } |
| 456 | RETURN_NOT_OK(ConvertNumber<Int32Type>(json_obj[0], *this->type_, &value.days)); |
| 457 | RETURN_NOT_OK( |
| 458 | ConvertNumber<Int32Type>(json_obj[1], *this->type_, &value.milliseconds)); |
| 459 | return builder_->Append(value); |
| 460 | } |
| 461 | |
| 462 | std::shared_ptr<ArrayBuilder> builder() override { return builder_; } |
| 463 |
nothing calls this directly
no test coverage detected