Manually convert bson to json.