aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMike Buland <mbuland@penny-arcade.com>2019-06-12 17:12:15 -0700
committerMike Buland <mbuland@penny-arcade.com>2019-06-12 17:12:15 -0700
commit889cf794108dc1a8c4d2c50fc864846799f512e1 (patch)
tree0bcaaa64c9289cc48f55f9f1daa7f64ca5c8c45a /src/tests
parentca3f5b64d656a86ea411572737be7facd067fd62 (diff)
downloadlibbu++-889cf794108dc1a8c4d2c50fc864846799f512e1.tar.gz
libbu++-889cf794108dc1a8c4d2c50fc864846799f512e1.tar.bz2
libbu++-889cf794108dc1a8c4d2c50fc864846799f512e1.tar.xz
libbu++-889cf794108dc1a8c4d2c50fc864846799f512e1.zip
Json objects can be formatted directly.
Diffstat (limited to '')
-rw-r--r--src/tests/json.cpp6
1 files changed, 6 insertions, 0 deletions
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[] )
7{ 7{
8 Bu::Json j( "\x01" "ACTION" "\x01" ); 8 Bu::Json j( "\x01" "ACTION" "\x01" );
9 Bu::println( j.toString() ); 9 Bu::println( j.toString() );
10
11 Bu::Json ob( Bu::Json::Object );
12 ob.insert("hello", 47.0 );
13 const Bu::Json &obRef = ob;
14 Bu::println("%1").arg( obRef["hello"] );
15
10 return 0; 16 return 0;
11} 17}
12 18