JSON/BSON data structure template system