lawsoc-scraper/test/test_json_dump.py

13 lines
666 B
Python

# "mappings": { "lawsoc": { "_all": { "enabled":true }, "location": { "type": "geo_point" } } }
# print(json.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4, separators=(',', ': ')))
import json
# print(json.dumps({'mappings': {'lawsoc': {'_all': {'enabled':'true'}, {'location': {'type': 'geo_point'}}}}, sort_keys=True, indent=4, separators=(',', ': ')))
# print(json.dumps({"mappings": { "lawsoc": { "_all": { "enabled":'true' }, "location": { "type": "geo_point" } } } }, sort_keys=True, indent=4, separators=(',',': ')))
print(json.dumps({"mappings": {"lawsoc": {"_all": {"enabled": 'true'}, "location": {"type": "geo_point"}}}}, separators=(',',': ')))