From 889cf794108dc1a8c4d2c50fc864846799f512e1 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 12 Jun 2019 17:12:15 -0700 Subject: Json objects can be formatted directly. --- src/tests/json.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/tests') diff --git a/src/tests/json.cpp b/src/tests/json.cpp index 6490d8d..6ec92f0 100644 --- a/src/tests/json.cpp +++ b/src/tests/json.cpp @@ -7,6 +7,12 @@ int main( int argc, char *argv[] ) { Bu::Json j( "\x01" "ACTION" "\x01" ); Bu::println( j.toString() ); + + Bu::Json ob( Bu::Json::Object ); + ob.insert("hello", 47.0 ); + const Bu::Json &obRef = ob; + Bu::println("%1").arg( obRef["hello"] ); + return 0; } -- cgit v1.2.3