private function leafToStdObject(ProcessableInterface $tree)
 {
     $result = new \StdClass();
     $msgName = $tree->getName();
     $result->{$msgName} = $tree->getValue();
     return $result;
 }
 private function buildChildrenTreeBody(ProcessableInterface $message)
 {
     $content = '';
     $contentArray = [];
     foreach ($message->getChildren() as $child) {
         $contentArray[] = $this->buildContent($child);
     }
     $content = '{' . implode(',', $contentArray) . '}';
     return $content;
 }
 private function leafToArray(ProcessableInterface $tree)
 {
     return [$tree->getName() => $tree->getValue()];
 }