You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Chris Chabot (JIRA)" <ji...@apache.org> on 2008/07/23 17:40:31 UTC

[jira] Commented: (SHINDIG-469) Error parsing canonicaldb.json in PHP

    [ https://issues.apache.org/jira/browse/SHINDIG-469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616128#action_12616128 ] 

Chris Chabot commented on SHINDIG-469:
--------------------------------------

Hey Gonzalo,

this part of the patch:

-//  WARNING! Changing this file will affect unit-tests
-//  A canonical JSON backed DB of OpenSocial datastrcutres in their RESTful forms
-//
-//  Basic structure:
-//  { people : Array<Person>,
-//    activity : Map<Person.Id, Array<Activity>>
-//    data : Map<Person.Id, Map<String,String>>
-//    friendLinks : Map<Person.Id, Array<Person.Id>>
-//  }
-//
-//  Notes:
-//   - The structure of Person, Activity MUST! match those in the RESTful spec
-//   - Data for "canonical" user should exercise every field in the spec. And is relied on
-//     for unit-testing so change at your peril
-//   - Consider adding a structure for Map<Person.Id, Array<appId>> to represent installed gadgets
-//
-//  TODO:
-//   - Use URLs for appIds
-//
-//

That's not really required, just take the regex from the container.js parser that strips out the comments and use that before you call json_decode().

That doesn't mean the trailing ,'s aint no problem though :)

> Error parsing canonicaldb.json in PHP
> -------------------------------------
>
>                 Key: SHINDIG-469
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-469
>             Project: Shindig
>          Issue Type: Bug
>          Components: RESTful API (Java), RESTful API (PHP)
>            Reporter: Gonzalo Aune
>         Attachments: canonicaldb-fix.patch
>
>
> I had a couple of errors trying to decode the json db in PHP, it simply dont parse.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.