yajl_free(m_handle);
}
- bool append(const char* data, size_t size) { return yajl_parse(m_handle, reinterpret_cast<const unsigned char*>(data), size) != yajl_status_ok; }
- bool done() { return yajl_complete_parse(m_handle) != yajl_status_ok; }
+ bool append(const char* data, size_t size) { return yajl_parse(m_handle, reinterpret_cast<const unsigned char*>(data), size) == yajl_status_ok; }
+ bool last() { return yajl_complete_parse(m_handle) == yajl_status_ok; }
static int parseNull(void* ctx)
{ return runParser(ctx, &NodeParser::parseNull); }
: m_handle(yajl_alloc(&callbacks, NULL, this)),
m_parser(topParser)
{
+ yajl_config(m_handle, yajl_allow_multiple_values, 1);
}
Parser::Parser(NodeParser* topParser)
return m_impl->append(data, size);
}
-bool Parser::done()
+bool Parser::last()
{
- return m_impl->done();
+ return m_impl->last();
}