#!/bin/env python
-- coding: utf-8 --
import json
a={}
a['name'] = "test"
a['age'] = '18'
b="fdsfdsfdsfd"
a1=[]
a1.append(a)
try:
str1=json.dumps(a1)
except Exception as e:
print "convert a failed"
else:
print "convert a success:%s" % str1
b1=[]
b1.append(b)
print b1
try:
str1=json.dumps(b1)
except Exception as e:
print "convert b failed"
else:
print "convert b success:%s" % str1