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

"closed! the author of the module gave me answer."

Could you, please, tell what is the answer?

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

Replies are listed 'Best First'.
Re^2: correct way to Catalyst::View::JSON?
by cragapito (Scribe) on Feb 10, 2015 at 00:13 UTC

    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).