Code

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#2515 closed defect (fixed)

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

Reported by: nesh <nesh [at] studioquattro [dot] co [dot] yu> Owned by: adrian
Component: Core (Other) Version: master
Severity: major Keywords: patch
Cc: nesh@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 (1)

json.diff (600 bytes) - added by nesh <nesh [at] studioquattro [dot] co [dot] yu> 8 years ago.
small fix

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by nesh <nesh [at] studioquattro [dot] co [dot] yu>

small fix

comment:1 Changed 8 years ago by nesh <nesh [at] studioquattro [dot] co [dot] yu>

  • Keywords patch added
  • Summary changed from [pach] json serializer don't pass options to simplejson.dump to [patch] json serializer don't pass options to simplejson.dump

comment:2 Changed 8 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.