BASE . LOG, 'file_id' => $LOG_FILE_ID, // add file date 'print_file_date' => true, // set debug and print flags 'debug_all' => $DEBUG_ALL ?? false, 'echo_all' => $ECHO_ALL ?? false, 'print_all' => $PRINT_ALL ?? false, ]); $json_class = 'CoreLibs\Convert\Json'; // define a list of from to color sets for conversion test print "TEST CLASS: JSON"; print ""; print '
Class Test Master
'; $json = '{"foo": "bar"}'; $output = Json::jsonConvertToArray($json); print "S::JSON: $json: " . DgS::printAr($output) . "
"; print "S::JSON ERROR: " . Json::jsonGetLastError() . ": " . Json::jsonGetLastError(true) . "
"; $json = '["f: {b"""ar}]'; $output = Json::jsonConvertToArray($json); print "S::E-JSON: $json: " . DgS::printAr($output) . "
"; print "S::E-JSON ERROR: " . Json::jsonGetLastError() . ": " . Json::jsonGetLastError(true) . "
"; // direct $json = '{"direct": "static function call"}'; $output = $json_class::jsonConvertToArray($json); print "J/S::JSON: $json: " . DgS::printAr($output) . "
"; print "J/S::JSON ERROR: " . $json_class::jsonGetLastError() . ": " . $json_class::jsonGetLastError(true) . "
"; $json = '["f: {b"""ar}]'; $output = $json_class::jsonConvertToArray($json); print "J/S::E-JSON: $json: " . DgS::printAr($output) . "
"; print "J/S::E-JSON ERROR: " . $json_class::jsonGetLastError() . ": " . $json_class::jsonGetLastError(true) . "
"; // $json = '{"foo": "bar"}'; // $output = Jason::jsonConvertToArray($json); // print "S::JSON: $json: " . DgS::printAr($output) . "
"; // print "S::JSON ERROR: " . Jason::jsonGetLastError() . ": " . Jason::jsonGetLastError(true) . "
"; // error message print $log->printErrorMsg(); print ""; // __END__