Help for this page

Select Code to Download


  1. or download this
    use JSON::Path;
    $json = q( { "array": [ 1, 2, 3], "string": "string_value", "object": 
    +{ "obj1": "val1", "obj2": "val2" } } );
    ...
    elsif ( ref $value eq q(ARRAY) ) { print "ARRAY\n" }
    
    else { print "NEITHER" }
    
  2. or download this
    Use of uninitialized value $json_object in concatenation (.) or string
    + at /usr/local/share/perl/5.20.2/JSON/Path/Evaluator.pm line 84.
    Unable to decode  as JSON: malformed JSON string, neither tag, array, 
    +object, number, string or atom, at character offset 0 (before "(end o
    +f string)") at /usr/local/share/perl/5.20.2/JSON/Path/Evaluator.pm li
    +ne 81.
     at /usr/local/share/perl/5.20.2/JSON/Path/Evaluator.pm line 79.