Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31617

Re: Remove uncide notation

References <e3a36bc8-ccaa-4bf5-a005-f7c016fe1de2@googlegroups.com>
Date 2012-10-18 02:40 -0700
Subject Re: Remove uncide notation
From Chris Rebert <clp2@rebertia.com>
Newsgroups comp.lang.python
Message-ID <mailman.2415.1350553209.27098.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Oct 18, 2012 at 2:27 AM, Ashish Jain <ashishjain.ash@gmail.com> 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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Remove uncide notation Ashish Jain <ashishjain.ash@gmail.com> - 2012-10-18 02:27 -0700
  Re: Remove uncide notation Chris Rebert <clp2@rebertia.com> - 2012-10-18 02:40 -0700
    Re: Remove uncide notation Ashish Jain <ashishjain.ash@gmail.com> - 2012-10-18 03:19 -0700
    Re: Remove uncide notation Ashish Jain <ashishjain.ash@gmail.com> - 2012-10-18 03:19 -0700
  Re: Remove uncide notation 88888 Dihedral <dihedral88888@googlemail.com> - 2012-10-19 11:48 -0700

csiph-web