RapidApp icon indicating copy to clipboard operation
RapidApp copied to clipboard

Difficulties with RapidApp and Catalyst::View::JSON

Open smonff opened this issue 6 years ago • 0 comments

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.

smonff avatar Sep 24 '18 11:09 smonff