Ticket #228 (closed defect: fixed)

Opened 5 months ago

Last modified 3 months ago

Error saving igadget variables when they are not strings

Reported by: aarranz Assigned to: aarranz
Priority: major Milestone:
Component: EzWeb-platform Version:
Keywords: Cc: mac@tid.es

Description (Last modified by aarranz)

For example, if you stablish a boolean value to a igadget variable (true o false), the server will refuse to update the variables complaining that true/false is no a valid identifier (they are not valid in python as python uses True/False).

The problem is that EzWeb Platform uses eval instead of a true json parser, so it fails to parse some valid json documents. The solution is to use a real json parser.

Change History

07/28/08 10:15:13 changed by aarranz

  • status changed from new to assigned.

07/28/08 10:41:01 changed by aarranz

  • description changed.

Django comes with simplejson, so the first attempt is to use the simplejson decoder, but, seeing some comparisions(2), I think that python-cjson(1) is better than simplejson. However, I have not tested it directly (I have a patch to make EzWeb use cjson, but I have not done any reliable benchmarking yet) so I do not know if is worth the change.

(1) http://pypi.python.org/pypi/python-cjson/ (2) http://blog.hill-street.net/?p=7

07/28/08 10:41:57 changed by aarranz

(En [1346]) refs #228. Use simplejson decoder to parse input jsons instead of eval.

09/08/08 07:23:02 changed by aarranz

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

I think that using simplejson is fine.