| 87 | } |
| 88 | |
| 89 | Status JsonReader::ExtractInt32(const Value* object, |
| 90 | const char* field, |
| 91 | int32_t* result) const { |
| 92 | const Value* val; |
| 93 | RETURN_NOT_OK(ExtractField(object, field, &val)); |
| 94 | if (PREDICT_FALSE(!val->IsInt())) { |
| 95 | return Status::InvalidArgument(Substitute( |
| 96 | "wrong type during field extraction: expected int32 but got $0", |
| 97 | TypeToString(val->GetType()))); |
| 98 | } |
| 99 | *result = val->GetInt(); |
| 100 | return Status::OK(); |
| 101 | } |
| 102 | |
| 103 | Status JsonReader::ExtractUint32(const Value* object, |
| 104 | const char* field, |