package App::ArduinoBuilder::JsonTool;
# Package that implement bi-directionnal communication with a tool talking
# JSON (like the Arduino pluggable discovery and monitor tools).
use strict;
use war
nings;
use utf8;
use App::ArduinoBuilder::System 'split_cmd';
use JSON::PP;
use IPC::Run qw(start pump finish timeout);
use Log::Any::Simple ':default';
# TODO: look into what should be done with U
ut_exn;
sub new {
my ($class, $cmd) = @_;
my $this = bless {
out => '', # Out from the JsonTool class point of view, this will be the tool STDIN
in => '', # This will be the tool STDOU