Standard deserializers are provided for primitive types. See comments on Value.
| 560 | // Standard deserializers are provided for primitive types. |
| 561 | // See comments on Value. |
| 562 | inline bool fromJSON(const Value &E, std::string &Out) { |
| 563 | if (auto S = E.getAsString()) { |
| 564 | Out = std::string(*S); |
| 565 | return true; |
| 566 | } |
| 567 | return false; |
| 568 | } |
| 569 | inline bool fromJSON(const Value &E, int &Out) { |
| 570 | if (auto S = E.getAsInteger()) { |
| 571 | Out = *S; |
no test coverage detected