Please consider taking things step by step so that you build up to the solution incrementally rather than trying to take one giant leap at the start.
use feature ":5.14"; use warnings FATAL => qw(all); use strict; use Data::Dump qw(dump pp); use JSON::PP; my $j = JSON::PP->new; my $d = $j->decode(<<'END'); { "StatusCode": 0, "StatusInfo": "Command Processed OK", "BranchNumber": "5528", "CustomerId": "20846164", "CustomerName": "Mr Stubbs", "SessionKey": "5VApkMMTjO8LtFCy9VjcSrcZKxoewwHGj6XoUUGaH2fBWf73cU", "InAmendOrderMode": "N", "BasketID": "98911496", "ChosenDeliverySlotInfo": "No delivery slot is reserved.", "CustomerForename": "James" } END pp($d)
Produces:
{ BasketID => 98911496, BranchNumber => 5528, ChosenDeliverySlotInfo => "No delivery slot is reserved.", CustomerForename => "James", CustomerId => 20846164, CustomerName => "Mr Stubbs", InAmendOrderMode => "N", SessionKey => "5VApkMMTjO8LtFCy9VjcSrcZKxoewwHGj6XoUUGaH +2fBWf73cU", StatusCode => 0, StatusInfo => "Command Processed OK", }
In reply to Re: Help with JSON Module
by philiprbrenan
in thread Help with JSON Module
by foggy3657
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |