[Open-collaboration-services] JSON output?

Frank Karlitschek karlitschek at kde.org
Thu Aug 12 15:10:09 CEST 2010


Hi Ben,

yes, the JSON support is in the OCS spec for a while because people requested it. You should support it to be compatible. 
It´s quite easy to do in PHP. 

in the lib_ocs referen implementation we do:

  $json=array();
  $json['status']=$status;
  $json['statuscode']=$statuscode;
  $json['message']=$message;
  $json['totalitems']=$itemscount;
  $json['itemsperpage']=$itemsperpage;
  $json['data']=$data;
  return(json_encode($json));

http://www.socialdesktop.org/library/lib_ocs.txt



Cheers
Frank


On 12.08.2010, at 08:54, Ben Cooksley wrote:

> Hi all,
> 
> Is providing output in JSON format ( using the format=json parameter )
> still needed?
> If so, is there some example output that I can use as a basis for an
> implementation?
> 
> Regards,
> Ben
> _______________________________________________
> Open-collaboration-services mailing list
> Open-collaboration-services at kde.org
> https://mail.kde.org/mailman/listinfo/open-collaboration-services


--
Frank Karlitschek
karlitschek at kde.org






More information about the Open-collaboration-services mailing list