Collective.jsonify for Plone5.2/Zope4/Python3?

I'd like to use collective.jsonify with Plone5.2/Zope4/Python3 to get some data from an existing (new) site. But collective.jsonify is not yet ported to Python3. I used the "2to3" script to adapt to collective.jsonify to Python3, but it does not work. here's the error:

Module Products.ExternalMethod.ExternalMethod, line 239, in __call__
   - __traceback_info__: ((<PloneSite at /mysite>,), {}, None)
TypeError: a bytes-like object is required, not 'str'

Any idea what could be wrong?

Take the Python debugger to track it down. 2to3 is only one part of moving an add-on from Python 2 to Python 3 and there is no guarantee that you do not have to perform other steps - in particular because jsonify is doing a lot of low level things with data.

I did not know about the very useful zope debug prompt; along with ipython I was able to make a special version for the newest zope running with python 3. Thanks a lot!
P.S. The zope debug prompt should be promoted on the first page of the Plone documentation, even for beginners, not deeply hidden in one of the darkest area of that documentation, as a tool for experts.

You can use Plone's REST API to get the contents in JSON format:

Hi Mikel, and thanks for the link; it looks useful. Can it export in the same (or a simiilar) format than collective.jsonify? I may have to stick to the jsonify format because I will migrate content from a Plone 3.0 web site. I would study sample exports from 5.2 in order to adapt the ones from 3.0.

Formats are different, completel different.

Plone Foundation Code of Conduct