Convert to GeoJson Point that is jsonable to GeoJSON

@return \GeoJson\Geometry\MultiLineString
327452
public function jsonSerialize()
    {
        $linestrings = [];

        foreach ($this->linestrings as $linestring) {
            $linestrings[] = $linestring->jsonSerialize();
        }

        return new \GeoJson\Geometry\MultiLineString($linestrings);
    }
840621
public function jsonSerialize()
    {
        return array_map(function($value)
        {
            if($value instanceof JsonSerialize)
                return $value->jsonSerialize();
            elseif($value instanceof  JsonInterface)
                return json_decode($value->toJson(), true);
            elseif($value instanceof ArrayInterface)
                return $value->toArray();
            else
                return $value;

        }, $this->attributes);
    }
752656
public function jsonSerialize()
    {
        return [
            'draw'            => (int) $this->draw,
            'recordsTotal'    => (int) $this->recordsTotal,
            'recordsFiltered' => (int) $this->recordsFiltered,
            'data'            => $this->data,
        ];
    }
708872
function convert(json) {
		var wkt = '', coordinates;

		if (!json) throw new Error('Not able to parse Geometry. No argument or null passed.');

		// check if JSON is passed as String and convert to object
		if (typeof json === 'string') {
			try {
				json = JSON.parse(json);
			} catch (e) {
				throw new Error('Not able to parse Geometry. Invalid String.');
			}
		} else if (typeof json !== 'object') {
			throw new Error('Not able to parse Geometry. Invalid data type.');
		}

		if (!json.coordinates) throw new Error('Not able to parse geometry. Property geometry not set.');

		switch (json.type) {
			case 'Point':
				wkt = parsePointGeometry(json.coordinates);
				break;
			case 'MultiPoint':
				wkt = parseMultiPointGeometry(json.coordinates);
				break;
			case 'LineString':
				wkt = parseLineGeometry(json.coordinates);
				break;
			case 'MultiLineString':
				wkt = parseMultiLineGeometry(json.coordinates);
				break;
			case 'Polygon':
				wkt = parsePolygonGeometry(json.coordinates);
				break;
			case 'MultiPolygon':
				wkt = parseMultiPolygonGeometry(json.coordinates);
				break;
			default:
				throw new Error('Not able to parse geometry. Property type not set.');
		}
		return [json.type.toUpperCase(), '(', wkt, ')'].join('');
	}
956900
public function jsonSerialize() {
        $ret = new \stdClass();
        $ret->name = $this->name;

        if(count($this->values) > 0) {
            $values = array();
            $values['values'] = $this->values;
            $ret->values = $values;
        }

        $ret->nullable = $this->nullable;

        return $ret;
    }
307498
public function jsonSerialize() {
    $valid = (!isset($this->fillMode) ||
        $this->validateFillMode($this->fillMode)) &&
      (!isset($this->verticalAlignment) ||
        $this->validateVerticalAlignment($this->verticalAlignment)) &&
      (!isset($this->horizontalAlignment) ||
        $this->validateHorizontalAlignment($this->horizontalAlignment));
    if (!$valid) {
      return NULL;
    }
    return parent::jsonSerialize();
  }
369093
public function getGeoJson(): ?string
    {
        if (! ($code = $this->getIsoAlpha2())) {
            return null;
        }

        return file_exists($file = __DIR__.'/../resources/geodata/'.mb_strtolower($code).'.json') ? file_get_contents($file) : null;
    }
385436
public function toGeoJson()
    {
        $raw = array (
            $this->getLongitude(),
            $this->getLatitude()
        );

        if ($this->hasAltitude()) {
            $raw[] = $this->getAltitude();
        }

        return $raw;
    }
868037
public function toJson()
    {
        $data = [];

        foreach ($this->attributes as $key => $value) {
            if (!in_array($key, $this->hidden)) {
                $data[$key] = $value;
            }
        }

        return json_encode($data);
    }
686836
public function getJSONString()
	{
		$json = '{'
				. '"@context":"' .			SocialRecord::JSONLD_CONTEXT . '",'
				. '"@type":"' .				SocialRecord::JSONLD_TYPE . '",'
				. '"type":"' .				$this->type . '",'
				. '"globalID":"' .			$this->globalID . '",'
				. '"platformGID":"' .		$this->platformGID . '",'
				. '"displayName":"' .		$this->displayName . '",'
				. '"profileLocation":"' .	$this->profileLocation . '",'
				. '"personalPublicKey":"' .	PublicKey::exportKey($this->personalPublicKey) . '",'
				. '"accountPublicKey":"' .	PublicKey::exportKey($this->accountPublicKey) . '",'
				. '"salt":"' .	 			$this->salt . '",'
				. '"datetime":"' .	 		$this->datetime . '",'
				. '"active":' . 			$this->active . ','
				. '"keyRevocationList":[';
				
		foreach($this->keyRevocationList as $krc)
		{
			$json .= $krc->getJSONString();
			if($krc !== end($this->keyRevocationList)) $json .= ',';
		}
		
		$json .= ']}';
		
		return $json;
	}
978213
public function toJSON()
  {
    $json = json_encode( $this->toArray() );

    return str_replace(
      [
          '"%hoverCallback%"',
          '"%formatter%"',
          '"%dateFormat%"',
      ],
      [
          $this->hoverCallback,
          $this->formatter,
          $this->dateFormat,
      ],
      $json
    );
  }
874379
public function jsonSerialize() { // @codingStandardsIgnoreLine (CONTRIB-6469).
        global $CFG;
        return [
            'type' => $this->get_type(),
            'series' => $this->series,
            'labels' => $this->labels,
            'title' => $this->title,
            'axes' => [
                'x' => $this->xaxes,
                'y' => $this->yaxes,
            ],
            'config_colorset' => !empty($CFG->chart_colorset) ? $CFG->chart_colorset : null
        ];
    }
712258
public function jsonSerialize()
    {
        if (! Norm::options('include')) {
            return $this->toArray();
        }

        $destination = array();
        $source =  $this->toArray();

        $schema = $this->collection->schema();

        foreach ($source as $key => $value) {
            if (isset($schema[$key]) and isset($value)) {
                $destination[$key] = $schema[$key]->toJSON($value);
            } else {
                $destination[$key] = $value;
            }

            $destination[$key] = JsonKit::replaceObject($destination[$key]);
        }

        return $destination;
    }
1286225
public String toJson() {
        Map<String, Object> data = toMap();
        return SerializationUtils.toJsonString(data);
    }
555392
public function jsonSerialize()
    {
        $bounds = $this->getBounds();

        // No rectangle support of geojson, so create a polygon
        return array(
            'type'        => 'Polygon',
            'coordinates' => array(
                array(
                    $bounds->getNorthEast()->toGeoJson(),
                    $bounds->getNorthWest()->toGeoJson(),
                    $bounds->getSouthWest()->toGeoJson(),
                    $bounds->getSouthEast()->toGeoJson()
                )
            )
        );
    }
804542
public static @Nonnull JsonArray toJsonJLineString(@Nonnull double[][] lineString) {
        JsonArray points = array();
        for (double[] values : lineString) {
            JsonArray subArray = array();
            for (double value : values) {
                subArray.add(primitive(value));
            }
            points.add(subArray);
        }

        return points;
    }
337449
public function jsonSerialize(){
		$arrData = array();

		foreach($this as $strKey => $objValue){
			if($this->options($strKey)->json){
				$mixValue = $objValue->jsonSerialize();
				$mixJSON = json_encode($mixValue);
				if((!is_null($mixValue) && $mixJSON!='[]') || $this->options($strKey)->jsonnull){
					$arrData[$strKey] = $mixValue;
				}
			}
		}
		return $arrData;
	}