Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update json-spirit to version 4.08 to support multibyte characters.
This change updates json-spirit to the latest public version: https://www.codeproject.com/KB/recipes/JSON_Spirit/json_spirit_v4.08.zip 4.08 adds support for a raw_utf8 option when writing a JSON string. Previously, multibyte characters were being escaped when being sent from cucumber-cpp to cucumber-ruby. Because cucumber-ruby's wire decoder does not properly decode escaped character sequences, this would crash cucumber-ruby.
- Loading branch information
src
committed
Jul 1, 2019
1 parent
5fff48f
commit ee964b2
Showing
16 changed files
with
636 additions
and
386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,137 +1,137 @@ | ||
// Copyright John W. Wilkinson 2007 - 2009. | ||
// Copyright John W. Wilkinson 2007 - 2014 | ||
// Distributed under the MIT License, see accompanying file LICENSE.txt | ||
|
||
// json spirit version 4.03 | ||
// json spirit version 4.08 | ||
|
||
#include "json_spirit_reader.h" | ||
#include "json_spirit_reader_template.h" | ||
|
||
using namespace json_spirit; | ||
|
||
bool json_spirit::read( const std::string& s, Value& value ) | ||
{ | ||
return read_string( s, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( const std::string& s, Value& value ) | ||
{ | ||
read_string_or_throw( s, value ); | ||
} | ||
|
||
bool json_spirit::read( std::istream& is, Value& value ) | ||
{ | ||
return read_stream( is, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::istream& is, Value& value ) | ||
{ | ||
read_stream_or_throw( is, value ); | ||
} | ||
|
||
bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value ) | ||
{ | ||
return read_range( begin, end, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value ) | ||
{ | ||
begin = read_range_or_throw( begin, end, value ); | ||
} | ||
|
||
#ifndef BOOST_NO_STD_WSTRING | ||
|
||
bool json_spirit::read( const std::wstring& s, wValue& value ) | ||
{ | ||
return read_string( s, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( const std::wstring& s, wValue& value ) | ||
{ | ||
read_string_or_throw( s, value ); | ||
} | ||
|
||
bool json_spirit::read( std::wistream& is, wValue& value ) | ||
{ | ||
return read_stream( is, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::wistream& is, wValue& value ) | ||
{ | ||
read_stream_or_throw( is, value ); | ||
} | ||
|
||
bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value ) | ||
{ | ||
return read_range( begin, end, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value ) | ||
{ | ||
begin = read_range_or_throw( begin, end, value ); | ||
} | ||
#ifdef JSON_SPIRIT_VALUE_ENABLED | ||
bool json_spirit::read( const std::string& s, Value& value ) | ||
{ | ||
return read_string( s, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( const std::string& s, Value& value ) | ||
{ | ||
read_string_or_throw( s, value ); | ||
} | ||
|
||
bool json_spirit::read( std::istream& is, Value& value ) | ||
{ | ||
return read_stream( is, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::istream& is, Value& value ) | ||
{ | ||
read_stream_or_throw( is, value ); | ||
} | ||
|
||
bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value ) | ||
{ | ||
return read_range( begin, end, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value ) | ||
{ | ||
begin = read_range_or_throw( begin, end, value ); | ||
} | ||
#endif | ||
|
||
#if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING ) | ||
bool json_spirit::read( const std::wstring& s, wValue& value ) | ||
{ | ||
return read_string( s, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( const std::wstring& s, wValue& value ) | ||
{ | ||
read_string_or_throw( s, value ); | ||
} | ||
|
||
bool json_spirit::read( std::wistream& is, wValue& value ) | ||
{ | ||
return read_stream( is, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::wistream& is, wValue& value ) | ||
{ | ||
read_stream_or_throw( is, value ); | ||
} | ||
|
||
bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value ) | ||
{ | ||
return read_range( begin, end, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value ) | ||
{ | ||
begin = read_range_or_throw( begin, end, value ); | ||
} | ||
#endif | ||
|
||
bool json_spirit::read( const std::string& s, mValue& value ) | ||
{ | ||
return read_string( s, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( const std::string& s, mValue& value ) | ||
{ | ||
read_string_or_throw( s, value ); | ||
} | ||
|
||
bool json_spirit::read( std::istream& is, mValue& value ) | ||
{ | ||
return read_stream( is, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::istream& is, mValue& value ) | ||
{ | ||
read_stream_or_throw( is, value ); | ||
} | ||
|
||
bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value ) | ||
{ | ||
return read_range( begin, end, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value ) | ||
{ | ||
begin = read_range_or_throw( begin, end, value ); | ||
} | ||
|
||
#ifndef BOOST_NO_STD_WSTRING | ||
|
||
bool json_spirit::read( const std::wstring& s, wmValue& value ) | ||
{ | ||
return read_string( s, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( const std::wstring& s, wmValue& value ) | ||
{ | ||
read_string_or_throw( s, value ); | ||
} | ||
|
||
bool json_spirit::read( std::wistream& is, wmValue& value ) | ||
{ | ||
return read_stream( is, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::wistream& is, wmValue& value ) | ||
{ | ||
read_stream_or_throw( is, value ); | ||
} | ||
|
||
bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value ) | ||
{ | ||
return read_range( begin, end, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value ) | ||
{ | ||
begin = read_range_or_throw( begin, end, value ); | ||
} | ||
#ifdef JSON_SPIRIT_MVALUE_ENABLED | ||
bool json_spirit::read( const std::string& s, mValue& value ) | ||
{ | ||
return read_string( s, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( const std::string& s, mValue& value ) | ||
{ | ||
read_string_or_throw( s, value ); | ||
} | ||
|
||
bool json_spirit::read( std::istream& is, mValue& value ) | ||
{ | ||
return read_stream( is, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::istream& is, mValue& value ) | ||
{ | ||
read_stream_or_throw( is, value ); | ||
} | ||
|
||
bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value ) | ||
{ | ||
return read_range( begin, end, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value ) | ||
{ | ||
begin = read_range_or_throw( begin, end, value ); | ||
} | ||
#endif | ||
|
||
#if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING ) | ||
bool json_spirit::read( const std::wstring& s, wmValue& value ) | ||
{ | ||
return read_string( s, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( const std::wstring& s, wmValue& value ) | ||
{ | ||
read_string_or_throw( s, value ); | ||
} | ||
|
||
bool json_spirit::read( std::wistream& is, wmValue& value ) | ||
{ | ||
return read_stream( is, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::wistream& is, wmValue& value ) | ||
{ | ||
read_stream_or_throw( is, value ); | ||
} | ||
|
||
bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value ) | ||
{ | ||
return read_range( begin, end, value ); | ||
} | ||
|
||
void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value ) | ||
{ | ||
begin = read_range_or_throw( begin, end, value ); | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.