1 #ifndef JSON_SPIRIT_UTILS
2 #define JSON_SPIRIT_UTILS
9 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
18 template<
class Obj_t,
class Map_t >
23 for(
typename Obj_t::const_iterator i = obj.begin(); i != obj.end(); ++i )
25 mp_obj[ i->name_ ] = i->value_;
29 template<
class Obj_t,
class Map_t >
34 for(
typename Map_t::const_iterator i = mp_obj.begin(); i != mp_obj.end(); ++i )
36 obj.push_back(
typename Obj_t::value_type( i->first, i->second ) );
40 #ifdef JSON_SPIRIT_VALUE_ENABLED
44 #if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
48 template<
class Object_type,
class String_type >
51 for(
typename Object_type::const_iterator i = obj.begin(); i != obj.end(); ++i )
53 if( i->name_ == name )
59 return Object_type::value_type::Value_type::null;
void map_to_obj(const Map_t &mp_obj, Obj_t &obj)
const Object_type::value_type::Value_type & find_value(const Object_type &obj, const String_type &name)
void obj_to_map(const Obj_t &obj, Map_t &mp_obj)