Gets the data object from json file

@return mixed|Object
183085
protected function getComposerData()
    {
        if (null == $this->composerData) {
            $json = file_get_contents($this->getComposerFile());
            $this->composerData = json_decode($json);

            if (null === $this->composerData) {
                throw new ComposerParseException(
                    "Error parsing file {$this->getComposerFile()}"
                );
            }
        }

        return $this->composerData;
    }
84557
protected function read()
    {
        $contents = $this->filesystem()->get($this->path);
        $data     = json_decode($contents, true);

        if (is_null($data)) {
            throw new RuntimeException("Invalid JSON file in [{$this->path}]");
        }

        return (array) $data;
    }
682474
public function __load()
    {
        if (! file_exists($file = $this->getDatabaseFileName())) {
            return collect();
        }

        return collect(json_decode(file_get_contents($file), true));
    }
155159
public function getData()
  {
    // Return public properties
    $dataVars = call_user_func('get_object_vars', $this);

    if (count($dataVars) > 0)
    {
      array_walk_recursive(
        $dataVars,
        function (&$value)
        {
          if ($value instanceof AbstractEnum)
          {
            /** @var $value AbstractEnum */
            $value = $value->getValue();
          }
          elseif ($value instanceof Response)
          {
            $value = $value->getData();
          }
          elseif ($value instanceof ResponseArray)
          {
            $value = $value->getResponses();
          }
        }
      );
    }

    return $dataVars;
  }
512668
public function jsonSerialize()
		{
			$data               = (object) [];
			$data->type         = 'folder';
			$data->name         = $this->name;
			$data->route        = $this->route;
			$data->parents      = $this->parents;
			$data->folders      = $this->folders;
			$data->controllers  = $this->controllers;
			return $data;
		}
1075642
private function readData()
    {
        switch ($this->fileType) {
            case self::TYPE_JSON :
                $data = json_decode(file_get_contents($this->readPath), true);
                break;
            default : $data = require $this->readPath;
        }
        return $data;
    }
580318
protected function get(){
        $bpath = Config::getx('path_temp');
        if(is_file($bpath.'debug.log')){
            return json_decode(file_get_contents($bpath.'debug.log'),true);
        }
        return null;
    }
638161
public function getData()
    {
        $data   = [];
        $path   = $this->getPath();
        $dir    = new Folder($path);
        $files  = (array) $dir->find('.*\.php');

        if (count($files) > 0) {
            foreach ($files as $file) {
                $name     = FS::filename($file);
                $segments = explode('_', $name);
                $version  = array_shift($segments);
                $class    = Inflector::camelize(implode('_', $segments));

                $data[$version] = [
                    'class' => $class,
                    'path'  => $path . DS . $file
                ];
            }
        }

        return $data;
    }
569681
public function getJson() : ?string 
    {
        if ( ! $this->hasJson()) {
            $this->setJson($this->getDefaultJson());
        }
        return $this->json;
    }
768179
public function getData()
    {
        $properties = $this->getGeneratedProperties();

        $data = [];
        foreach ($properties as $property) {
            $key = $property->getName();
            $data[$key] = $this->{$key};
        }

        $result = array_merge($this->objectData, $data);
        ksort($result);

        return $result;
    }
816662
public function getJSONObject()
    {
        $r = new \stdClass();
        $r->name = $this->getCollectionName();
        $r->cID = $this->getCollectionID();

        return $r;
    }
1315386
public function getDataForJSON($data = null)
    {
        if (is_null($data)) {
            $data = $this->getData();
        }
        $dataForJSON = parent::getDataForJSON($data);
        if (!is_null($this->atomic)) {
            $dataForJSON['@atomic'] = $this->atomic;
        }
        if (isset($this->sourceId)) {
            $dataForJSON['@sourceId'] = $this->sourceId;
            $this->sourceId = null;
        }
        return $dataForJSON;
    }
889134
public function jsonSerialize() {
        $data = new stdClass();
        $vars = get_object_vars($this);

        foreach ($vars as $property => $value) {
            if ($value === null) {
                continue;
            }

            $data->{$property} = $value;
        }

        return $data;
    }
1103675
public function extractJson()
    {
        foreach($this->getRows() as &$row) {

            foreach($this->getJsonFields() as $field) {
                if (isset($row[$field])) {

                    $data = json_decode($row[$field], JSON_OBJECT_AS_ARRAY);

                    foreach((array) $data as $k => $v) {
                        $row[sprintf('_%s__%s', $field, $k)] = $v;
                    }
                }
            }
        }
        return $this;
    }
203746
public function getBaseJSONObject()
    {
        $o = new stdClass();
        $error = $this->getError();
        if ($error instanceof Exception) {
            $o->error = true;
            $o->errors = [$error->getMessage()];
        } elseif ($error instanceof ErrorList && $error->has()) {
            $o->error = true;
            $o->errors = [];
            foreach ($error->getList() as $e) {
                $o->errors[] = (string) $e;
            }
        } else {
            $error = (string) $error;
            if ($error !== '') {
                $o->error = true;
                $o->errors = [$error];
            }
        }
        $o->time = $this->getTime();
        $o->message = $this->getMessage();
        $o->title = $this->getTitle();
        $o->redirectURL = (string) $this->getRedirectURL();
        foreach ($this->additionalData as $key => $value) {
            $o->{$key} = $value;
        }

        return $o;
    }
521107
public function getData()
    {
        if (null == $this->_response) {
            $response = $this->_responseString;

            try {
                if ($this->getJsonBigintConversion()) {
                    $response = JSON::parse($response, true, 512, JSON_BIGINT_AS_STRING);
                } else {
                    $response = JSON::parse($response);
                }
            } catch (JSONParseException $e) {
                // leave response as is if parse fails
            }

            if (empty($response)) {
                $response = [];
            }

            if (\is_string($response)) {
                $response = ['message' => $response];
            }

            $this->_response = $response;
            $this->_responseString = '';
        }

        return $this->_response;
    }
1291848
public function getData()
    {
        $result = [
            'content_type' => $this->type
        ];

        switch($this->type)
        {
            case self::TYPE_LOCATION:
                $result['image_url'] = $this->image_url;
                break;

            case self::TYPE_TEXT:
                $result['payload'] = $this->payload;
                $result['title'] = $this->title;
                $result['image_url'] = $this->image_url;
                break;
                
            case self::TYPE_USER_PHONE_NUMBER:
                $result['payload'] = $this->payload;
                break;
                
            case self::TYPE_USER_EMAIL:
                $result['payload'] = $this->payload;
                break;
        }

        return $result;
    }