src/POData/Writers/Json/JsonODataV1Writer.php
/**
	 * @param ODataLink $link Link to write.
	 *
	 * @return JsonODataV1Writer
	 */
@param ODataLink $link Link to write.
@param ODataLink $link Link to write .
protected function writeLink(ODataLink $link)
    {
        $this->_writer->writeName($link->title);
	    if ($link->isExpanded) {
		    if(is_null($link->expandedResult)){
				$this->_writer->writeValue("null");
		    }
		    else{
			    $this->writeExpandedLink($link);
		    }
	    } else {
		    $this->_writer
			    ->startObjectScope()
			    ->writeName(ODataConstants::JSON_DEFERRED_STRING)
			    ->startObjectScope()
			    ->writeName($this->urlKey)
			    ->writeValue($link->url)
			    ->endScope()
			    ->endScope()
		    ;
	    }
	    return $this;
    }
protected function writeLink ( ODataLink $ link ) { $ this -> _writer -> writeName ( $ link -> title ) ; if ( $ link -> isExpanded ) { if ( is_null ( $ link -> expandedResult ) ) { $ this -> _writer -> writeValue ( " null " ) ; } else { $ this -> writeExpandedLink ( $ link ) ; } } else { $ this -> _writer -> startObjectScope ( ) -> writeName ( ODataConstants :: JSON_DEFERRED_STRING ) -> startObjectScope ( ) -> writeName ( $ this -> urlKey ) -> writeValue ( $ link -> url ) -> endScope ( ) -> endScope ( ) ; } return $ this ; }
@param ODataLink $link Link to write.
@param ODataLink $link Link to write .
// "<linkname>" :