json_spirit_writer.cpp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. // ECOin - Copyright (c) - 2014/2021 - GPLv3 - epsylon@riseup.net (https://03c8.net)
  2. #include "json_spirit_writer.h"
  3. #include "json_spirit_writer_template.h"
  4. void json_spirit::write( const Value& value, std::ostream& os )
  5. {
  6. write_stream( value, os, false );
  7. }
  8. void json_spirit::write_formatted( const Value& value, std::ostream& os )
  9. {
  10. write_stream( value, os, true );
  11. }
  12. std::string json_spirit::write( const Value& value )
  13. {
  14. return write_string( value, false );
  15. }
  16. std::string json_spirit::write_formatted( const Value& value )
  17. {
  18. return write_string( value, true );
  19. }
  20. #ifndef BOOST_NO_STD_WSTRING
  21. void json_spirit::write( const wValue& value, std::wostream& os )
  22. {
  23. write_stream( value, os, false );
  24. }
  25. void json_spirit::write_formatted( const wValue& value, std::wostream& os )
  26. {
  27. write_stream( value, os, true );
  28. }
  29. std::wstring json_spirit::write( const wValue& value )
  30. {
  31. return write_string( value, false );
  32. }
  33. std::wstring json_spirit::write_formatted( const wValue& value )
  34. {
  35. return write_string( value, true );
  36. }
  37. #endif
  38. void json_spirit::write( const mValue& value, std::ostream& os )
  39. {
  40. write_stream( value, os, false );
  41. }
  42. void json_spirit::write_formatted( const mValue& value, std::ostream& os )
  43. {
  44. write_stream( value, os, true );
  45. }
  46. std::string json_spirit::write( const mValue& value )
  47. {
  48. return write_string( value, false );
  49. }
  50. std::string json_spirit::write_formatted( const mValue& value )
  51. {
  52. return write_string( value, true );
  53. }
  54. #ifndef BOOST_NO_STD_WSTRING
  55. void json_spirit::write( const wmValue& value, std::wostream& os )
  56. {
  57. write_stream( value, os, false );
  58. }
  59. void json_spirit::write_formatted( const wmValue& value, std::wostream& os )
  60. {
  61. write_stream( value, os, true );
  62. }
  63. std::wstring json_spirit::write( const wmValue& value )
  64. {
  65. return write_string( value, false );
  66. }
  67. std::wstring json_spirit::write_formatted( const wmValue& value )
  68. {
  69. return write_string( value, true );
  70. }
  71. #endif