json list fixes

http://www.camptocamp.org/forums/viewtopic.php?id=230596
- conditions and hastrack boolean correctly done
- empty total items & co

fixes #862