Django

Code

Ticket #2515 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

[patch] json serializer don't pass options to simplejson.dump

Reported by: nesh <nesh [at] studioquattro [dot] co [dot] yu> Assigned to: adrian
Milestone: Component: Core framework
Version: SVN Keywords: patch
Cc: nesh@studioquattro.co.yu Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

I'm lost a few hours finding out why my utf-8 encoded strings end up with double-byte characters encoded like \u00xx\u00xx. Finally I found ensure_ascii=False option but it didn't work.

... (time passes) ...

Well, it seems that options are not passed to SimpleJSON -- patch attached.

Also, it's worth mentioning in docs that if you have utf-8 encoded data you must use ensure_ascii=False option -- or simply make that default.

Attachments

json.diff (0.6 kB) - added by nesh <nesh [at] studioquattro [dot] co [dot] yu> on 08/10/06 08:19:09.
small fix

Change History

08/10/06 08:19:09 changed by nesh <nesh [at] studioquattro [dot] co [dot] yu>

  • attachment json.diff added.

small fix

08/10/06 08:19:58 changed by nesh <nesh [at] studioquattro [dot] co [dot] yu>

  • keywords set to patch.
  • summary changed from [pach] json serializer don't pass options to simplejson.dump to [patch] json serializer don't pass options to simplejson.dump.

09/22/06 08:26:07 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(In [3795]) Fixed #2515 -- Allow passing of options to JSON serializer. Thanks, nesh.


Add/Change #2515 ([patch] json serializer don't pass options to simplejson.dump)




Change Properties
Action