http://qs321.pair.com?node_id=11112785


in reply to PERL REST API Post script

If your JSON doesn't parse, actually examining the generated JSON and figuring out why it doesn't parse is probably the way to go.

Of course, by hand-rolling your JSON you are trying to re-invent the wheel. Why not just build the Perl structure and then have something like the JSON module do the heavy lifting for you?

OK, JSON is not a core module, and maybe you are one of those unfortunates who can not install the module of your choice where you need it. You might still use the JSON module to help validate your hand-generated (yukkk!) JSON.

Replies are listed 'Best First'.
Re^2: PERL REST API Post script
by haukex (Archbishop) on Feb 11, 2020 at 16:54 UTC
    OK, JSON is not a core module

    JSON::PP has been a core module since Perl v5.14 (2011).