blob: d588a02b61f31614279e7dec0a6efb9f92b467e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include <bu/json.h>
#include <bu/file.h>
#include <bu/sio.h>
#include <bu/streamstack.h>
int main( int argc, char *argv[] )
{
Bu::Json j("Hi there");
Bu::println( j.toString() );
return 0;
}
void hi()
{
Bu::File fIn( "test1.json", Bu::File::Read );
Bu::Json ob( fIn );
ob.write( Bu::sioRaw );
Bu::println("\n");
Bu::String back1 = ob.toStringStable();
Bu::Json ob2( back1 );
Bu::String back2 = ob2.toStringStable();
Bu::println( back1 );
Bu::println( back2 );
if( back1 == back2 )
Bu::println("loop success");
else
Bu::println("loop failure");
}
|