diff options
author | Jonas Schnelli <jonas.schnelli@include7.ch> | 2015-05-18 14:02:18 +0200 |
---|---|---|
committer | Jonas Schnelli <jonas.schnelli@include7.ch> | 2015-06-04 09:16:21 +0200 |
commit | 9a8897f4ac992741e153d88b54bd2cde877c713d (patch) | |
tree | e827981679708bae6bef1516d69efda3524b719f /src/univalue/univalue.cpp | |
parent | 3df0411ad9fd75fb27af53e44835d41f5480fe3f (diff) |
Remove JSON Spirit wrapper, remove JSON Spirit leftovers
- implement find_value() function for UniValue
- replace all Array/Value/Object types with UniValues, remove JSON Spirit to UniValue wrapper
- remove JSON Spirit sources
Diffstat (limited to 'src/univalue/univalue.cpp')
-rw-r--r-- | src/univalue/univalue.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/univalue/univalue.cpp b/src/univalue/univalue.cpp index 994d93113a..e8fc513433 100644 --- a/src/univalue/univalue.cpp +++ b/src/univalue/univalue.cpp @@ -213,3 +213,15 @@ const char *uvTypeName(UniValue::VType t) return NULL; } +const UniValue& find_value( const UniValue& obj, const std::string& name) +{ + for (unsigned int i = 0; i < obj.keys.size(); i++) + { + if( obj.keys[i] == name ) + { + return obj.values[i]; + } + } + + return NullUniValue; +}
\ No newline at end of file |