integrated json to bson method