vanstyn / RapidApp

Turnkey ajaxy webapps
http://rapi.io
Other
48 stars 15 forks source link

Difficulties with RapidApp and Catalyst::View::JSON #178

Open smonff opened 5 years ago

smonff commented 5 years ago

Hello,

Is there any reason that, when using RapidApp, when I try to set a Catalyst::View::JSON view with something like:

$ perl script/testapp_create.pl controller Api
$ perl script/testapp_create.pl view JSON JSON

And the following in a controller :

sub index :Path :Args(0) {
    my ( $self, $c ) = @_;
    $c->stash->{hello} = "world";
    $c->forward( $c->view('JSON'));
}

... the JSON data are always null in the front-end side? The headers are correctly set and my browser interpret it as JSON, but it only display null, no key/value pairs. I tested it with a normal Catalyst application and everything behave like expected without any other configuration.

Maybe it is collisioning with something else, or, there is a specific RapidApp way to do this, but I didn't find anything in the doc, sorry.

Thanks for any help.