updates to collection and parser

* fix compile error on mac
* handle long field
* handle old and new json