src/Api/Serializer/JsonBody.php
public function build(Shape $shape, array $args)
    {
        $result = json_encode($this->format($shape, $args));

        return $result == '[]' ? '{}' : $result;
    }
public function build(Shape $shape, array $args)
    {
        $result = json_encode($this->format($shape, $args));

        return $result == '[]' ? '{}' : $result;
    }
public function build ( Shape $ shape , array $ args ) { $ result = json_encode ( $ this -> format ( $ shape , $ args ) ) ; return $ result == '[]' ? '{}' : $ result ; }
Builds the JSON body based on an array of arguments.

@param Shape $shape Operation being constructed
@param array $args  Associative array of arguments

@return string
Builds the JSON body based on an array of arguments .