Store field values in a JSON file?
You could use the routing system and create a custom route and output your json within the controller. 

After that you can load the url in your ajax call.

module.routing.yml (path_to_module/):

  module.content:
  path: '/json-output'
  defaults:
    _controller: '\Drupal\module\Controller\ModuleController::content'

  requirements:
    _permission: 'access content'


ModuleController.php (path_to_module/src/Controller/):

&lt;?php

namespace Drupal\module\Controller;

use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\HttpFoundation\Response;

/**
 * An example controller.
 */
class ModuleController extends ControllerBase {

  /**
   * {@inheritdoc}
   */
  public function content() {
    // Load your json content here.
    $json = module_get_json();

    $response = new Response();
    $response-&gt;setContent($json);
    $response-&gt;headers-&gt;set('Content-Type', 'application/json');
    return $response;

  }

}


Now you can load your json via /json-output. It is also possible to pass variables to the controller via the url.