code: function HttpJsonResult(data)
  {
      if (data instanceof String) {
          this.data = data;
      }
      else if (data instanceof Error) {
          var keys = Object.getOwnPropertyNames(data);
          var thisData = {};
          _.forEach(keys, function(key) {
              if (process.env.NODE_ENV !== 'development' && key==='stack') {
                  return;
              }
              thisData[key] = data[key];
          });
          this.data = thisData;
      }
      else {
          this.data = data;
      }
  
      this.contentType = 'application/json;charset=utf-8';
      this.contentEncoding = 'utf8';
  }
docs: @classdesc Represents the result an action that is used to send JSON-formatted content.
  @class
  @param {*} data - The data which is going to send when this result will be executed
  @augments HttpResult
  @constructor
  
  @example
  
  
  import HttpBaseController from '@themost/web/controllers/base';
  import {httpController,httpGet, httpAction} from '@themost/web/decorators';
  import {HttpJsonResult} from "@themost/web/mvc";
  
  \@httpController()
  export default class HelloController extends HttpBaseController {
  
  constructor(context) {
  super(context);
  }
  
  GET /hello/index.json
  
  \@httpGet()
  \@httpAction('index')
  getIndex() {
  return this.json({
  "message": "Hello World"
  });
  }
  
  }
  
  @example
  
  Send a JSON formatted error to client
  
  import HttpBaseController from '@themost/web/controllers/base';
  import {httpController,httpGet, httpAction} from '@themost/web/decorators';
  import {HttpJsonResult} from "@themost/web/mvc";
  
  \@httpController()
  export default class HelloController extends HttpBaseController {
  
  constructor(context) {
  super(context);
  }
  
  \@httpGet()
  \@httpAction('index')
  getIndex() {
  return this.json({
  "code": "E401",
  "message": "You are not authorized to view data."
  }).status(401);
  }
  
  }