pymongo cursor에서 특정 field가 존재하는지 확인하는 코드
</div>-->
if 'key_of_the_field' in cursor:
if 'key_of_the_field' in cursor:
'Programming > MongoDB' 카테고리의 다른 글
mongodb install & basic commands (772) | 2018.01.25 |
---|---|
pymongo cursor를 json으로 변환하기 (0) | 2017.10.23 |
MongoDB to Elasticsearch (0) | 2017.10.23 |
Programming/MongoDB
2017. 10. 23. 17:52
pymongo cursor를 json으로 변환하기
</div>-->
아래와 같이 수행한다. from bson.json_util import dumps dumps(l) 아래와 같이하면 한글이 코드로 깨져 변환되는 상황을 막을수 있다. dumps(l, ensure_ascii=False)
아래와 같이 수행한다.
from bson.json_util import dumps
dumps(l)
아래와 같이하면 한글이 코드로 깨져 변환되는 상황을 막을수 있다.
dumps(l, ensure_ascii=False)
'Programming > MongoDB' 카테고리의 다른 글
mongodb install & basic commands (772) | 2018.01.25 |
---|---|
pymongo cursor에서 특정 field가 존재하는지 확인하는 코드 (0) | 2017.10.23 |
MongoDB to Elasticsearch (0) | 2017.10.23 |
Programming/MongoDB
2017. 10. 23. 17:46
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Netty
- kubernetes
- X-Pack
- PubSub
- MongoDB
- 은전한닢
- zsh
- IntelliJ
- docker-machine
- Python
- scrapy
- Paw
- Spring Boot
- git
- Redis
- PIP
- GCP
- pymongo
- ansible-container
- boot2docker
- Ansible
- spring #lombok
- mecab
- pycharm
- Elasticsearch
- AWS
- xpath
- TDD
- docker
- MacOS
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함