mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 10:32:57 +01:00
- fixed GH #362: Defect in Var::parseString when there is no space between value and newline
- fixed GH #314: JSON parsing bug - added GH #313: MetaColumn additions for Data::ODBC and Data::SQLite
This commit is contained in:
parent
f038ac4e63
commit
8a9e7792d9
@ -55,6 +55,9 @@ Release 1.5.3 (2014-05-xx)
|
||||
- added SQlite Full Text Search support
|
||||
- added Thread::trySleep() and Thread::wakeUp()
|
||||
- fixed GH #410: Bug in JSON::Object.stringify() in 1.5.2
|
||||
- fixed GH #362: Defect in Var::parseString when there is no space between value and newline
|
||||
- fixed GH #314: JSON parsing bug
|
||||
- added GH #313: MetaColumn additions for Data::ODBC and Data::SQLite
|
||||
|
||||
Release 1.5.2 (2013-09-16)
|
||||
==========================
|
||||
|
@ -107,6 +107,7 @@ void ODBCMetaColumn::init()
|
||||
case SQL_CHAR:
|
||||
case SQL_VARCHAR:
|
||||
case SQL_LONGVARCHAR:
|
||||
case -8:// PostgreSQL CHAR (with size specified - psqlODBC)
|
||||
case -9:// SQL Server NVARCHAR
|
||||
case -10:// PostgreSQL VARCHAR (without size specified)
|
||||
setType(MetaColumn::FDT_STRING); break;
|
||||
|
@ -110,6 +110,9 @@ Utility::Utility()
|
||||
_types.insert(TypeMap::value_type("INT64", MetaColumn::FDT_INT64));
|
||||
_types.insert(TypeMap::value_type("LONG", MetaColumn::FDT_INT64));
|
||||
_types.insert(TypeMap::value_type("INTEGER64", MetaColumn::FDT_INT64));
|
||||
_types.insert(TypeMap::value_type("TINYINT", MetaColumn::FDT_INT8));
|
||||
_types.insert(TypeMap::value_type("SMALLINT", MetaColumn::FDT_INT16));
|
||||
_types.insert(TypeMap::value_type("BIGINT", MetaColumn::FDT_INT64));
|
||||
_types.insert(TypeMap::value_type("COUNTER", MetaColumn::FDT_UINT64));
|
||||
_types.insert(TypeMap::value_type("AUTOINCREMENT", MetaColumn::FDT_UINT64));
|
||||
_types.insert(TypeMap::value_type("REAL", MetaColumn::FDT_DOUBLE));
|
||||
|
@ -41,7 +41,7 @@
|
||||
<ClCompile Include="src\SQLiteTestSuite.cpp">
|
||||
<Filter>_Suite\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\WinDriver.cpp">
|
||||
<ClCompile Include="src\Driver.cpp">
|
||||
<Filter>_Driver\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
|
@ -485,7 +485,7 @@ Var Var::parseArray(const std::string& val, std::string::size_type& pos)
|
||||
std::string Var::parseString(const std::string& val, std::string::size_type& pos)
|
||||
{
|
||||
static const std::string STR_STOP("\"");
|
||||
static const std::string OTHER_STOP(" ,]}"); // we stop at space, ',', ']' or '}'
|
||||
static const std::string OTHER_STOP("\n ,]}");
|
||||
|
||||
bool inString = false;
|
||||
//skip optional ' "
|
||||
|
@ -2192,10 +2192,18 @@ void VarTest::testJSONDeserializeString()
|
||||
assert (b.convert<std::string>() == "test");
|
||||
|
||||
Var c('c');
|
||||
std::string tst2 = Var::toString(c);
|
||||
Var b2 = Var::parse(tst2);
|
||||
tst = Var::toString(c);
|
||||
Var b2 = Var::parse(tst);
|
||||
char cc = b2.convert<char>();
|
||||
assert (cc == 'c');
|
||||
|
||||
tst = "{ \"a\" : 1, \"b\" : 2 \n}";
|
||||
a = Var::parse(tst);
|
||||
assert(a.toString() == "{ \"a\" : \"1\", \"b\" : \"2\" }");
|
||||
|
||||
tst = "{ \"a\" : 1, \"b\" : 2\n}";
|
||||
a = Var::parse(tst);
|
||||
assert(a.toString() == "{ \"a\" : \"1\", \"b\" : \"2\" }");
|
||||
}
|
||||
|
||||
|
||||
|
@ -96,7 +96,7 @@ void ParseHandler::startObject()
|
||||
|
||||
void ParseHandler::endObject()
|
||||
{
|
||||
_stack.pop();
|
||||
if (!_stack.empty()) _stack.pop();
|
||||
}
|
||||
|
||||
|
||||
@ -132,7 +132,7 @@ void ParseHandler::startArray()
|
||||
|
||||
void ParseHandler::endArray()
|
||||
{
|
||||
_stack.pop();
|
||||
if (!_stack.empty()) _stack.pop();
|
||||
}
|
||||
|
||||
|
||||
|
1
JSON/testsuite/data/invalid/double-closing-brace/input
Normal file
1
JSON/testsuite/data/invalid/double-closing-brace/input
Normal file
@ -0,0 +1 @@
|
||||
{"data":"10"}}
|
1
JSON/testsuite/data/invalid/double-closing-bracket/input
Normal file
1
JSON/testsuite/data/invalid/double-closing-bracket/input
Normal file
@ -0,0 +1 @@
|
||||
[1,2,3]]
|
Loading…
Reference in New Issue
Block a user