json: make bbJsonArrGetSize and bbJsonObjGetSize type-save
json: make C++ value accessors runtime type safe