[Bugs] #1553 UNSP: CJSON parser too strict for exchange formats (such as Journal Entry Bundles)

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Thu Nov 12 09:55:04 EST 2009


#1553: CJSON parser too strict for exchange formats (such as Journal Entry
Bundles)
------------------------------------------+---------------------------------
    Reporter:  martin.langhoff            |          Owner:  alsroot                    
        Type:  defect                     |         Status:  new                        
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  journal                    |        Version:  0.84.x                     
    Severity:  Unspecified                |       Keywords:                             
Distribution:  OLPC                       |   Status_field:  Unconfirmed                
------------------------------------------+---------------------------------
 This commit
 http://git.sugarlabs.org/projects/sugar/repos/mainline/commits/ee4535c98ae74347e7072909d49dcf8a5e16ca7b
 switched from JSON to CJSON.

 The fallout of it is that now the reader of "exchange" formats such as
 Journal Entry Bundles is failing to read perfectly valid files.

 JEBs are sometimes produced outside of Sugar, for example in Moodle code
 (which is PHP). PHP has no way to produce CJSON -- the _only_ CJSON writer
 in existence is written in Python, and CJSON is actually an OLPC/Sugar
 invention.

 Attached is a patch fixing simple JEB imports, but it is very limited: if
 the JEB has a buddies entry, the CJSON parser still kicks in and fails to
 parse it.

 Perhaps a better fix is to just revert the patch above. I just don't know
 the rationale.

 More info on the fallout on this OLPC bug:
 http://dev.laptop.org/ticket/9651

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/1553>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list