rsanchez / json

Output ExpressionEngine data in JSON format.
http://devot-ee.com/add-ons/json/
100 stars 236 forks source link

Support for EE3 #58

Open anthony-pinskey opened 8 years ago

anthony-pinskey commented 8 years ago

@rsanchez Can we get support for this with ExpressionEngine 3 with the new directory/core changes?

Thanks!

giriprashaad commented 8 years ago

Would be good to add support.

But converting this to EE3 was a 5 minute process.

Create a file addon.setup.php with the following:

<?php

return array(
    'author' => 'rsanchez',
    'author_url' => 'https://github.com/rsanchez/json',
    'description' => 'Output ExpressionEngine data in JSON format.',
    'docs_url' => 'https://github.com/rsanchez/json',
    'name' => 'Json',
    'settings_exist' => false,
    'version' => '1.0.0',
    'namespace'   => 'json/Json'
);

and modify line 55 in the pi.json.php file:

from require_once PATH_MOD.'channel/mod.channel' . EXT;

to require_once PATH_MOD.'channel/mod.channel.php';

I wasn't sure why Expression engine 3 isn't accepting EXT. But the fix just works.

@rsanchez I haven't checked this completely but I'm able to read channel entries as JSON data which is what I want for now.

stefcab commented 7 years ago

@giriprashaad ,

Thanks for how converting Json to EE3, I will test your tips soon.

Regards,

Stéphane

stefcab commented 7 years ago

It's working fine using EE 3.5.11

Thanks a lot !