Remove uncide notation

Ashish Jain ashishjain.ash at gmail.com
Thu Oct 18 06:19:14 EDT 2012


On Thursday, 18 October 2012 15:10:33 UTC+5:30, Chris Rebert  wrote:
> On Thu, Oct 18, 2012 at 2:27 AM, Ashish Jain wrote:
> 
> > Hi,
> 
> >
> 
> > I have a html string in an object, when I do repr() of that object, I get value as:
> 
> >
> 
> > {'Id' : 1, 'Body': u'<p> Hello </p>'}
> 
> >
> 
> > I don't wish to have 'u' as the character in my string representation. As this is not a valid json notation now.
> 
> 
> 
> If you want JSON, then *use the freakin' `json` std lib module*!
> 
> http://docs.python.org/library/json.html
> 
> 
> 
> repr(...) != JSON
> 
> [It's similar only coincidentally, and only to a degree.]
> 
> 
> 
> Regards,
> 
> Chris

Thanks a lot!!



More information about the Python-list mailing list