mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 12:18:01 +01:00
json fixes
This commit is contained in:
@@ -146,6 +146,8 @@ bool ComboBoxCell::serializeJSON(std::ostream& out, const std::string& name)
|
|||||||
else
|
else
|
||||||
out << getFormatter()->format(sel);
|
out << getFormatter()->format(sel);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
out << "''";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ bool DateFieldCell::serializeJSON(std::ostream& out, const std::string& name)
|
|||||||
{
|
{
|
||||||
out << "'" << getFormatter()->format(getValue()) << "'";
|
out << "'" << getFormatter()->format(getValue()) << "'";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
out << "''";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ const Any& ListBoxCell::getSelected() const
|
|||||||
|
|
||||||
bool ListBoxCell::serializeJSON(std::ostream& out, const std::string& name)
|
bool ListBoxCell::serializeJSON(std::ostream& out, const std::string& name)
|
||||||
{
|
{
|
||||||
out << name;
|
out << name << ":";
|
||||||
if (hasSelected())
|
if (hasSelected())
|
||||||
{
|
{
|
||||||
const Poco::Any& sel = getSelected();
|
const Poco::Any& sel = getSelected();
|
||||||
@@ -180,6 +180,8 @@ bool ListBoxCell::serializeJSON(std::ostream& out, const std::string& name)
|
|||||||
else
|
else
|
||||||
out << ":" << getFormatter()->format(sel);
|
out << ":" << getFormatter()->format(sel);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
out << "''";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ bool NumberFieldCell::serializeJSON(std::ostream& out, const std::string& name)
|
|||||||
{
|
{
|
||||||
out << getFormatter()->format(getValue());
|
out << getFormatter()->format(getValue());
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
out << "''";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ bool PasswordFieldCell::serializeJSON(std::ostream& out, const std::string& name
|
|||||||
{
|
{
|
||||||
out << "'" << getFormatter()->format(getValue()) << "'";
|
out << "'" << getFormatter()->format(getValue()) << "'";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
out << "''";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ bool TextEditCell::serializeJSON(std::ostream& out, const std::string& name)
|
|||||||
{
|
{
|
||||||
out << "'" << getFormatter()->format(getValue()) << "'";
|
out << "'" << getFormatter()->format(getValue()) << "'";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
out << "''";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,6 +99,8 @@ bool TextFieldCell::serializeJSON(std::ostream& out, const std::string& name)
|
|||||||
{
|
{
|
||||||
out << "'" << getFormatter()->format(getValue()) << "'";
|
out << "'" << getFormatter()->format(getValue()) << "'";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
out << "''";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ bool TimeFieldCell::serializeJSON(std::ostream& out, const std::string& name)
|
|||||||
{
|
{
|
||||||
out << "'" << getFormatter()->format(getValue()) << "'";
|
out << "'" << getFormatter()->format(getValue()) << "'";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
out << "''";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user