Hello, I'm new to dancer, and I'm trying to figure out if Dancer has a built in way of pulling in JSON data from one of it's own routes, or if a module like JSON::RPC::Client is required. I see that Alex Knowles is using that module in his moonfruit.com site, and I'm just curious if that's the "Dancer" way to do it, or if it was Alex's personal preference. Reference: http://blogs.perl.org/users/alex_knowles/2011/03/yet-another-dancer-site.htm... Thanks, -Bobby
On Wed, Apr 6, 2011 at 11:51 PM, J. Bobby Lopez <jbl@jbldata.com> wrote:
Hello,
Hey Bobby!
I'm new to dancer,
Welcome! :)
and I'm trying to figure out if Dancer has a built in way of pulling in JSON data from one of it's own routes, or if a module like JSON::RPC::Client is required.
Dancer does not have a auto-reader route for JSON. For output, it *does* have a JSON serializer. However, I'm not sure what an auto-reader route will be useful for. It's basically just one line of code (JSON::decode_json $input).
I see that Alex Knowles is using that module in his moonfruit.com site, and I'm just curious if that's the "Dancer" way to do it, or if it was Alex's personal preference.
Considering there is nothing in Dancer core, there is no "Dancer way" to do it. The best way would be what works best for you. Hope that answers your question. Sawyer.
participants (2)
-
J. Bobby Lopez -
sawyer x