json_spirit_reader.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef JSON_SPIRIT_READER
  2. #define JSON_SPIRIT_READER
  3. // Copyright John W. Wilkinson 2007 - 2009.
  4. // Distributed under the MIT License, see accompanying file LICENSE.txt
  5. // json spirit version 4.03
  6. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  7. # pragma once
  8. #endif
  9. #include "json_spirit_value.h"
  10. #include "json_spirit_error_position.h"
  11. #include <iostream>
  12. namespace json_spirit
  13. {
  14. // functions to reads a JSON values
  15. bool read( const std::string& s, Value& value );
  16. bool read( std::istream& is, Value& value );
  17. bool read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
  18. void read_or_throw( const std::string& s, Value& value );
  19. void read_or_throw( std::istream& is, Value& value );
  20. void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
  21. #ifndef BOOST_NO_STD_WSTRING
  22. bool read( const std::wstring& s, wValue& value );
  23. bool read( std::wistream& is, wValue& value );
  24. bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
  25. void read_or_throw( const std::wstring& s, wValue& value );
  26. void read_or_throw( std::wistream& is, wValue& value );
  27. void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
  28. #endif
  29. bool read( const std::string& s, mValue& value );
  30. bool read( std::istream& is, mValue& value );
  31. bool read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
  32. void read_or_throw( const std::string& s, mValue& value );
  33. void read_or_throw( std::istream& is, mValue& value );
  34. void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
  35. #ifndef BOOST_NO_STD_WSTRING
  36. bool read( const std::wstring& s, wmValue& value );
  37. bool read( std::wistream& is, wmValue& value );
  38. bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
  39. void read_or_throw( const std::wstring& s, wmValue& value );
  40. void read_or_throw( std::wistream& is, wmValue& value );
  41. void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
  42. #endif
  43. }
  44. #endif