Link to home
Start Free TrialLog in
Avatar of Vlearns
Vlearns

asked on

decode json

i am doing
    %freeb =  %{$json->decode($fr_blob)};

and it is throwing warnings/messages like

unexpected end of string while parsing JSON string

for some rows ...as it reads the data in a huge file line by line...

in perl can i do something that checks if the string is valid json and not process it if its invalid?
i want to eliminate these messages
Avatar of Vlearns
Vlearns

ASKER

hi

can someone help with this?
Avatar of Vlearns

ASKER

how can i run json_decode on a string and if its bad json, then simply continue without barfing or throwing errors
ASKER CERTIFIED SOLUTION
Avatar of arober11
arober11
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial