diff options
author | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2010-02-10 19:41:22 +0000 |
---|---|---|
committer | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2010-02-10 19:41:22 +0000 |
commit | 40d324f102295b8eea70ec9ac6b42be417cbbfb8 (patch) | |
tree | 449039c92ef7b69afb7f6864032748d444c368a1 /json/json_spirit_writer.cpp | |
parent | 1c5d5e58c67e63fd83afd945c7db1190de62514a (diff) |
JSON Spirit library from http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx, MIT license
Diffstat (limited to 'json/json_spirit_writer.cpp')
-rw-r--r-- | json/json_spirit_writer.cpp | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/json/json_spirit_writer.cpp b/json/json_spirit_writer.cpp new file mode 100644 index 0000000000..f3367b68de --- /dev/null +++ b/json/json_spirit_writer.cpp @@ -0,0 +1,95 @@ +// Copyright John W. Wilkinson 2007 - 2009.
+// Distributed under the MIT License, see accompanying file LICENSE.txt
+
+// json spirit version 4.03
+
+#include "json_spirit_writer.h"
+#include "json_spirit_writer_template.h"
+
+void json_spirit::write( const Value& value, std::ostream& os )
+{
+ write_stream( value, os, false );
+}
+
+void json_spirit::write_formatted( const Value& value, std::ostream& os )
+{
+ write_stream( value, os, true );
+}
+
+std::string json_spirit::write( const Value& value )
+{
+ return write_string( value, false );
+}
+
+std::string json_spirit::write_formatted( const Value& value )
+{
+ return write_string( value, true );
+}
+
+#ifndef BOOST_NO_STD_WSTRING
+
+void json_spirit::write( const wValue& value, std::wostream& os )
+{
+ write_stream( value, os, false );
+}
+
+void json_spirit::write_formatted( const wValue& value, std::wostream& os )
+{
+ write_stream( value, os, true );
+}
+
+std::wstring json_spirit::write( const wValue& value )
+{
+ return write_string( value, false );
+}
+
+std::wstring json_spirit::write_formatted( const wValue& value )
+{
+ return write_string( value, true );
+}
+
+#endif
+
+void json_spirit::write( const mValue& value, std::ostream& os )
+{
+ write_stream( value, os, false );
+}
+
+void json_spirit::write_formatted( const mValue& value, std::ostream& os )
+{
+ write_stream( value, os, true );
+}
+
+std::string json_spirit::write( const mValue& value )
+{
+ return write_string( value, false );
+}
+
+std::string json_spirit::write_formatted( const mValue& value )
+{
+ return write_string( value, true );
+}
+
+#ifndef BOOST_NO_STD_WSTRING
+
+void json_spirit::write( const wmValue& value, std::wostream& os )
+{
+ write_stream( value, os, false );
+}
+
+void json_spirit::write_formatted( const wmValue& value, std::wostream& os )
+{
+ write_stream( value, os, true );
+}
+
+std::wstring json_spirit::write( const wmValue& value )
+{
+ return write_string( value, false );
+}
+
+std::wstring json_spirit::write_formatted( const wmValue& value )
+{
+ return write_string( value, true );
+}
+
+#endif
|