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
%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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
can someone help with this?