#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2009 Doug Hellmann All rights reserved. # """ """ #end_pymotw_header import json data = [ { 'a':'A', 'b':(2, 4), 'c':3.0 } ] print 'DATA:', repr(data) print 'NORMAL:', json.dumps(data, sort_keys=True) print 'INDENT:', json.dumps(data, sort_keys=True, indent=2)