Commit 6bf85b33 authored by project's avatar project

--no commit message

--no commit message
parent c903d30c
How to build xml2json
- install C++11 Compiler
- scl enable devtoolset-2 bash
- npm install
(for centos : http://hiltmon.com/blog/2015/08/09/c-plus-plus-11-on-centos-6-dot-6/)
\ No newline at end of file
......@@ -102,8 +102,11 @@ router.get('/:id/objects',function (req, res) {
var cont = true;
if(idx > rec_count){cont=false;}
rd.moveTo(idx);
//start stream response
res.type('application/json');
res.send('[');
async.whilst(
function() { return cont; },
function(callback){
......@@ -112,17 +115,21 @@ router.get('/:id/objects',function (req, res) {
if(!obj){
cont=false;
}else{
//console.log(obj);
obj_return.push(obj_out(obj));
var objout = obj_out(obj);
res.send(objout);
if(limit>0 && idx>=from_seq+limit){
cont=false;
}else{
res.send(',');
}
}
callback();
});
},function(err){
res.send(']');
bss.close(function(err){
respHelper.responseOK(obj_return);
res.status(200).end();
//respHelper.responseOK(obj_return);
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment