in reply to Re: correct way to Catalyst::View::JSON?
in thread correct way to Catalyst::View::JSON?

I'm so shamed! Why am I so dumb! Sorry.

I had found stackoverflow's answer from gdey:

What JSON view are you using? It seems that it is converting everything in the stash (This is the default.) The JSON view needs to be configured to only convert things in json_data field of the stash. in your 'MyApp.pm' add something like: MyApp->config({ 'View::JSON' => { expose_stash => 'json_data' } }); replacing MyApp with the name of your application controller.

But I was using the config in a inner controller while should be using in application controller.

My first post, my first self humiliation (and almost 5 years late).

  • Comment on Re^2: correct way to Catalyst::View::JSON?