Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions include/cereal/archives/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ namespace cereal
//! Saves a double to the current node
void saveValue(double d) { itsWriter.Double(d); }
//! Saves a string to the current node
void saveValue(std::string const & s) { itsWriter.String(s.c_str(), static_cast<CEREAL_RAPIDJSON_NAMESPACE::SizeType>( s.size() )); }
template<class CharT, class Traits, class Alloc> inline
void saveValue(std::basic_string<CharT, Traits, Alloc>const& s) { itsWriter.String(s.c_str(), static_cast<CEREAL_RAPIDJSON_NAMESPACE::SizeType>(s.size())); }
//! Saves a const char * to the current node
void saveValue(char const * s) { itsWriter.String(s); }
//! Saves a nullptr to the current node
Expand Down Expand Up @@ -655,7 +656,8 @@ namespace cereal
//! Loads a value from the current node - double overload
void loadValue(double & val) { search(); val = itsIteratorStack.back().value().GetDouble(); ++itsIteratorStack.back(); }
//! Loads a value from the current node - string overload
void loadValue(std::string & val) { search(); val = itsIteratorStack.back().value().GetString(); ++itsIteratorStack.back(); }
template<class CharT, class Traits, class Alloc> inline
void loadValue(std::basic_string<CharT, Traits, Alloc> & val) { search(); val = itsIteratorStack.back().value().GetString(); ++itsIteratorStack.back(); }
//! Loads a nullptr from the current node
void loadValue(std::nullptr_t&) { search(); CEREAL_RAPIDJSON_ASSERT(itsIteratorStack.back().value().IsNull()); ++itsIteratorStack.back(); }

Expand Down