| 662 | |
| 663 | /// Maps a property to a field, if it exists. |
| 664 | template <typename T> bool map(StringRef Prop, T &Out) { |
| 665 | assert(*this && "Must check this is an object before calling map()"); |
| 666 | if (const Value *E = O->get(Prop)) |
| 667 | return fromJSON(*E, Out); |
| 668 | return false; |
| 669 | } |
| 670 | |
| 671 | /// Maps a property to a field, if it exists. |
| 672 | /// (Optional requires special handling, because missing keys are OK). |