equal
deleted
inserted
replaced
14 for sc in c["subcategories"]: |
14 for sc in c["subcategories"]: |
15 output.append({"name": sc["code"],"keywords": [ sc["label"] ], "color" : sc["color"] }) |
15 output.append({"name": sc["code"],"keywords": [ sc["label"] ], "color" : sc["color"] }) |
16 else: |
16 else: |
17 output.append({"name": c["code"],"keywords": [ c["label"] ], "color" : c["color"] }) |
17 output.append({"name": c["code"],"keywords": [ c["label"] ], "color" : c["color"] }) |
18 |
18 |
|
19 output_str = json.dumps(output, separators=(',',':')) |
19 print "SIMPLE JSON DUMPS :" |
20 print "SIMPLE JSON DUMPS :" |
20 print json.dumps(output) |
21 print output_str |
21 print "\nURLLIB QUOTE_PLUS JSON DUMPS :" |
22 print "\nURLLIB QUOTE_PLUS JSON DUMPS :" |
22 print urllib.quote_plus(json.dumps(output)) |
23 print urllib.quote_plus(output_str) |