| 855 | |
| 856 | |
| 857 | std::string |
| 858 | Reader::getFormatedErrorMessages() const |
| 859 | { |
| 860 | std::string formattedMessage; |
| 861 | for ( Errors::const_iterator itError = errors_.begin(); |
| 862 | itError != errors_.end(); |
| 863 | ++itError ) |
| 864 | { |
| 865 | const ErrorInfo &error = *itError; |
| 866 | formattedMessage += "* " + getLocationLineAndColumn( error.token_.start_ ) + "\n"; |
| 867 | formattedMessage += " " + error.message_ + "\n"; |
| 868 | if ( error.extra_ ) |
| 869 | formattedMessage += "See " + getLocationLineAndColumn( error.extra_ ) + " for detail.\n"; |
| 870 | } |
| 871 | return formattedMessage; |
| 872 | } |
| 873 | |
| 874 | #define JSON_ASSERT( condition ) assert( condition ); |
| 875 | std::istream& operator>>( std::istream &sin, Value &root ) |