in reply to JSON::Parse how to warn_only()?
You are getting the following error message:
Usage: JSON::Parse::warn_only(parser, onoff)
It indicates that you need to use the following syntax:
my $jp = JSON::Parse->new(); JSON::Parse::warn_only($jp, 1);
The above simplifies to the following:
my $jp = JSON::Parse->new(); $jp->warn_only(1);
To parse the JSON, you need to use that $jp object, so you can't parse_json. You need to use run instead.
my $data = $jp->run($json);
That's why warn_only is documented as a method that can be used to modify run.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: JSON::Parse how to warn_only()?
by bliako (Abbot) on Jun 18, 2016 at 14:53 UTC | |
by ikegami (Patriarch) on Jun 19, 2016 at 04:25 UTC | |
by bliako (Abbot) on Jun 24, 2016 at 12:47 UTC |