void const_test( json::value const & value ) { BOOST_TEST( value.has_key("cafe") ); try { value["sam"]; int should_have_thrown = 1; BOOST_TEST( should_have_thrown == 0 ); } catch( std::out_of_range & e ) {} BOOST_TEST( value["cafe"] == "open" ); BOOST_TEST( value["bar"][2] == 1234.5 ); }