Skip to content

Commit 10db538

Browse files
committed
New
1 parent 0dd45b8 commit 10db538

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/test/json/sax_debug.cc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright (c) 2016 Dr. Colin Hirsch and Daniel Frey
2+
// Please see LICENSE for license or visit https://github.com/taocpp/json/
3+
4+
#include "test.hh"
5+
6+
#include <iostream>
7+
#include <tao/json/sax/debug.hh>
8+
#include <tao/json/sax/from_string.hh>
9+
10+
namespace tao
11+
{
12+
namespace json
13+
{
14+
void test( const std::string & v )
15+
{
16+
sax::debug handler( std::cout );
17+
sax::from_string( v, handler );
18+
}
19+
20+
void unit_test()
21+
{
22+
test( "[null,true,false,-42,43.0,\"foo\",[1,2,3],{\"a\":\"b\",\"c\":\"d\"}]" );
23+
}
24+
25+
} // json
26+
27+
} // tao
28+
29+
#include "main.hh"

0 commit comments

Comments
 (0)