From 740dbaa7a66a0b54de7a6e08c86f160468f8a33d Mon Sep 17 00:00:00 2001 From: Oliver Ofenloch <57812959+ofenloch@users.noreply.github.com> Date: Thu, 22 Dec 2022 11:14:49 +0100 Subject: [PATCH] Use the library's operator ```cpp std::ostream &boost::json::operator<<(std::ostream &os, const boost::json::value &jv) ``` for output instead of jv.getXYZ() with std::ostream's operator << --- example/pretty.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/example/pretty.cpp b/example/pretty.cpp index 18bd2f71..b175dafe 100644 --- a/example/pretty.cpp +++ b/example/pretty.cpp @@ -104,15 +104,9 @@ pretty_print( std::ostream& os, json::value const& jv, std::string* indent = nul } case json::kind::uint64: - os << jv.get_uint64(); - break; - case json::kind::int64: - os << jv.get_int64(); - break; - case json::kind::double_: - os << jv.get_double(); + os << jv; break; case json::kind::bool_: