Wenn dies dein erster Besuch hier ist, lies bitte zuerst die Hilfe - Häufig gestellte Fragen durch. Du musst dich vermutlich registrieren, bevor du Beiträge verfassen kannst. Klicke oben auf 'Registrieren', um den Registrierungsprozess zu starten. Du kannst auch jetzt schon Beiträge lesen. Suche dir einfach das Forum aus, das dich am meisten interessiert.
suche die LBS19001072 - LBS19001075. Diese sind leider nicht mehr im Download verfügbar. Kann die jemand einmal bereitstellen oder weiß einer näheres warum die nicht mehr im Download sind?
###[HELP]### This LBS takes a JSON string on E21 and outputs values on A1-A20 for corresponding matching keys on E1-E20. Outputs are only updated if the input JSON string on E21 is updated. If the output value for a given key would be an array, then this array is JSON-encoded again. The JSON-encoded output string is finally set on the corresponding output which can be connected to another instance of this LBS for further processing the next depth level of the original JSON string.
logic_setVar($id, 103, $E[22]['value']); // set loglevel to #VAR 103 LB_LBSID_logging($id, 'JSON Decoder LBS started');
if ($E[21]['refresh']==1) {
// Convert JSON string to associative array $input_json = (string)$E[21]['value']; $input_array = json_decode($input_json, true); if (json_last_error() === JSON_ERROR_NONE) {
// Only do something if the JSON string was not empty if (is_array($input_array)) { LB_LBSID_logging($id, 'Result array: ', $input_array);
for ($i = 1; $i <= 20; $i++) { $key = $E[$i]['value']; if (array_key_exists($key, $input_array)) { $value = $input_array[$key]; // Is this an array? Yes, then we reached the next depth level and we just output an new JSON string. // In this way, multiple LBS instances can be cascaded to decode each depth level. if(is_array($value)) { $json_value = json_encode($value); logic_setOutput($id, $i, $json_value); } else { logic_setOutput($id, $i, $value); } } else { $value = ''; logic_setOutput($id, $i, $value); } } }
###[HELP]### This LBS takes a JSON string on E11 and outputs values on A1-A10 for corresponding matching keys on E1-E10. Outputs are only updated if the input JSON string on E11 is updated. If the output value for a given key would be an array, then this array is JSON-encoded again. The JSON-encoded output string is finally set on the corresponding output which can be connected to another instance of this LBS for further processing the next depth level of the original JSON string.
logic_setVar($id, 103, $E[12]['value']); // set loglevel to #VAR 103 LB_LBSID_logging($id, 'JSON Decoder LBS started');
if ($E[11]['refresh']==1) {
// Convert JSON string to associative array $input_json = (string)$E[11]['value']; $input_array = json_decode($input_json, true); if (json_last_error() === JSON_ERROR_NONE) {
// Only do something if the JSON string was not empty if (is_array($input_array)) { LB_LBSID_logging($id, 'Result array: ', $input_array);
for ($i = 1; $i <= 10; $i++) { $key = $E[$i]['value']; if (array_key_exists($key, $input_array)) { $value = $input_array[$key]; // Is this an array? Yes, then we reached the next depth level and we just output an new JSON string. // In this way, multiple LBS instances can be cascaded to decode each depth level. if(is_array($value)) { $json_value = json_encode($value); logic_setOutput($id, $i, $json_value); } else { logic_setOutput($id, $i, $value); } } else { $value = ''; logic_setOutput($id, $i, $value); } } }
###[HELP]### This LBS takes a JSON string on E6 and outputs values on A1-A5 for corresponding matching keys on E1-E5. Outputs are only updated if the input JSON string on E6 is updated. If the output value for a given key would be an array, then this array is JSON-encoded again. The JSON-encoded output string is finally set on the corresponding output which can be connected to another instance of this LBS for further processing the next depth level of the original JSON string.
logic_setVar($id, 103, $E[7]['value']); // set loglevel to #VAR 103 LB_LBSID_logging($id, 'JSON Decoder LBS started');
if ($E[6]['refresh']==1) {
// Convert JSON string to associative array $input_json = (string)$E[6]['value']; $input_array = json_decode($input_json, true); if (json_last_error() === JSON_ERROR_NONE) {
// Only do something if the JSON string was not empty if (is_array($input_array)) { LB_LBSID_logging($id, 'Result array: ', $input_array);
for ($i = 1; $i <= 5; $i++) { $key = $E[$i]['value']; if (array_key_exists($key, $input_array)) { $value = $input_array[$key]; // Is this an array? Yes, then we reached the next depth level and we just output an new JSON string. // In this way, multiple LBS instances can be cascaded to decode each depth level. if(is_array($value)) { $json_value = json_encode($value); logic_setOutput($id, $i, $json_value); } else { logic_setOutput($id, $i, $value); } } else { $value = ''; logic_setOutput($id, $i, $value); } } }
###[HELP]### This LBS takes a JSON string on E2 and outputs a value on A1 for the corresponding matching key on E1. Outputs are only updated if the input JSON string on E2 is updated. If the output value for a given key would be an array, then this array is JSON-encoded again. The JSON-encoded output string is finally set on the corresponding output which can be connected to another instance of this LBS for further processing the next depth level of the original JSON string.
logic_setVar($id, 103, $E[3]['value']); // set loglevel to #VAR 103 LB_LBSID_logging($id, 'JSON Decoder LBS started');
if ($E[2]['refresh']==1) {
// Convert JSON string to associative array $input_json = (string)$E[2]['value']; $input_array = json_decode($input_json, true); if (json_last_error() === JSON_ERROR_NONE) {
// Only do something if the JSON string was not empty if (is_array($input_array)) { LB_LBSID_logging($id, 'Result array: ', $input_array);
for ($i = 1; $i <= 1; $i++) { $key = $E[$i]['value']; if (array_key_exists($key, $input_array)) { $value = $input_array[$key]; // Is this an array? Yes, then we reached the next depth level and we just output an new JSON string. // In this way, multiple LBS instances can be cascaded to decode each depth level. if(is_array($value)) { $json_value = json_encode($value); logic_setOutput($id, $i, $json_value); } else { logic_setOutput($id, $i, $value); } } else { $value = ''; logic_setOutput($id, $i, $value); } } }
Vielleicht will einer die LBS wieder einstellen? Ich würde das auch übernehmen. Bleibt aber die Frage, warum der Autor sie rausgenommen hat und ob wir sein geistiges Eigentum als unseres Ausgeben können. Weiß noch jemand wer die LBS geschrieben hat? Ich meine mich zu erinnern, dass es Nanosonde war, aber vielleicht liege ich da falsch.
Wir verarbeiten personenbezogene Daten über die Nutzer unserer Website mithilfe von Cookies und anderen Technologien, um unsere Dienste bereitzustellen. Weitere Informationen findest Du in unserer Datenschutzerklärung.
Indem Du unten auf "ICH stimme zu" klickst, stimmst Du unserer Datenschutzerklärung und unseren persönlichen Datenverarbeitungs- und Cookie-Praktiken zu, wie darin beschrieben. Du erkennst außerdem an, dass dieses Forum möglicherweise außerhalb Deines Landes gehostet wird und bist damit einverstanden, dass Deine Daten in dem Land, in dem dieses Forum gehostet wird, gesammelt, gespeichert und verarbeitet werden.
Kommentar