You are here: Home / LBN / Up2date / Plone and Zope / BastionLinux 19 / collective.jsonify-1.1-1.lbn19.noarch

collective.jsonify-1.1-1.lbn19.noarch

Package Attributes
RPM  collective.jsonify-1.1-1.lbn19.noarch.rpm Architecture  noarch Size  125364 Created  2019/09/30 06:55:33 UTC
Package Specification
Summary Provide json representation for content in Plone
Group Application/Internet
License ZPL
Home Page https://github.com/collective/collective.jsonify
Description

collective.jsonify exports your Plone content to JSON.

Many packages that export data from Plone have complicated dependencies, and so only work with Plone 3.0 or higher (or not even with 3.0). collective.jsonify's only dependency is simplejson. It can be installed in any Plone version, probably as far back as Plone 2.0 (not tested!).

The exported JSON is a collective.transmogrifier friendly format. Install collective.jsonify on a site you want to export from, and setup an import transmogrifier pipeline on the site you're importing to, using the blueprints in the collective.jsonmigrator package.

The @@jsonify BrowserView is also available with actions: query, list, get:

Parameters are important. Here are some interesting examples:

  • ACTION = QUERY : get MODIFIED (from date - to date) objects

http://www.myplonesite.com/custompath/deep/@@jsonify ?action=query &portal_type=my_at_or_dexterity_type &show_inactive=True &modified:list:date=2013-01-01 &modified:list:date=2013-03-01 &modified_usage=range:min:max

MORE: if "available" parameter is added, it returns the NUMBER of objects the query returned, NULL if no returns MORE: "send_bin" parameter is "False" by default. You can change this by passing "send_bin=True" MORE: "absolute_urls" parameter is "True" by default. You can change this by passing "absolute_urls=False" IMPORTANT: "path" parameter is not needed: is always considered in the query, from URL path

  • ACTION = LIST : COMPACT LIST OF LIVE OBJECTS

Why should I get it? Because by comparing it with the objects list in your mobile APP, you can have an evidence of DELETED objects. What is returned: [{uid,path}] What you cannot get: when an object has been deleted.

  • BINARY FIELDS:
  • binary fields names starts with "_datafield_" and are exported as dictionary, so you can download data separatly.

Example: An Image field called "photo" from a custom Archetype content is exported as:

"_datafield_photo": "{\"filename\": \"alpino-pizzeria.jpg\", \"data\": \" \", \"content_type\": \"image/jpeg\", \"size\": 55536, "md5": "fa2b0abcf540d2dde71d68071140a803"}"

Requires
rpmlib(PayloadFilesHavePrefix)  
rpmlib(FileDigests)  
rpmlib(PartialHardlinkSets)  
rpmlib(CompressedFileNames)  
/bin/sh  
rpmlib(PayloadIsXz)  
Provides
collective.jsonify

Document Actions