added flags FT::json and FT::space for pt::Space class - serializing/parsing to/from json/space
This commit is contained in:
@@ -722,14 +722,30 @@ void DbConnector::get_value(const char * value_str, pt::Space & field_value, con
|
||||
{
|
||||
pt::SpaceParser space_parser;
|
||||
|
||||
if( space_parser.parse_space(value_str, field_value) != pt::SpaceParser::ok )
|
||||
if( field_type.is_space() )
|
||||
{
|
||||
field_value.clear();
|
||||
|
||||
if( log )
|
||||
if( space_parser.parse_space(value_str, field_value) != pt::SpaceParser::ok )
|
||||
{
|
||||
(*log) << pt::Log::log2 << "Morm: I cannot correctly parse the Space struct from the datebase"
|
||||
<< ", the raw string is: " << value_str << pt::Log::logend;
|
||||
field_value.clear();
|
||||
|
||||
if( log )
|
||||
{
|
||||
(*log) << pt::Log::log2 << "Morm: I cannot correctly parse the Space struct (space format) from the datebase"
|
||||
<< ", the raw string was: " << value_str << pt::Log::logend;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( space_parser.parse_json(value_str, field_value) != pt::SpaceParser::ok )
|
||||
{
|
||||
field_value.clear();
|
||||
|
||||
if( log )
|
||||
{
|
||||
(*log) << pt::Log::log2 << "Morm: I cannot correctly parse the Space struct (json format) from the datebase"
|
||||
<< ", the raw string was: " << value_str << pt::Log::logend;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user