Generate the JSON for a record

@method mockJSON
@param {DS.Store} store
@param {subclass of DS.Model|string} type
@param {DS.Model} record
@param {boolean} [addId=false]
@return {Object}
515874
function (store, type, record, addId) {
    var json;
    type = this._parseModelOrType(store, type);
    json = record.serialize({includeId: true});
    if (!json.id && addId) {
      json.id = this.generateId(store, type);
    }
    type.eachRelationship(function (key, meta) {
      var records;
      if (!meta.async && meta.kind === 'hasMany' && (records = record.get(key)) && !json[key]) {
        json[key] = records.mapBy('id').filter(Boolean);
      }
    });
    return json;
  }
1314080
function (store, json) {
    var i, args = slice.call(arguments, 2), len = args.length, records, typeKey;
    for (i = 0; i < len; i += 2) {
      records = args[i + 1];
      records = records ? (isArray(records) ? records.slice() : [records]) : [];
      typeKey = pluralize(this._parseModelOrType(store, args[i]).typeKey);
      if (!json[typeKey]) {
        json[typeKey] = records;
      }
      else {
        injectNoConflict(json[typeKey], records);
      }
    }
    return json;
  }
812946
def record_add_types(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/addTypes' % object_id, input_params, always_retry=always_retry, **kwargs)
887895
def serialize(self, pid, record, links_factory=None, **kwargs):
        
        return json.dumps(
            self.transform_record(pid, record, links_factory, **kwargs),
            **self._format_args())
1159277
function(records,config) {
    
    //the hell is this doing here
    this.id = new Date();

    if ( records instanceof Array ) {
        this.records = records;
    } else {
        var dataField = records.data;
        var data = records.datasource;
        this.records =  data[dataField];
    }
    this.config = config;
    if ( this.config ) {
        this.propertyConfigMap = {};
        this.config.cols.forEach( col => {
            this.propertyConfigMap[col.property] = col;
        });
    }

    //indexRecords.call(this);
}
770749
def _get_record(self, record_type):
        
        if (not self.has_record_type(record_type) and
                record_type.get_identifier() not in self._record_type_data_sets):
            raise errors.Unsupported()
        if str(record_type) not in self._records:
            record_initialized = self._init_record(str(record_type))
            if record_initialized and str(record_type) not in self._my_map['recordTypeIds']:
                self._my_map['recordTypeIds'].append(str(record_type))
        return self._records[str(record_type)]
191935
function create(dataID: DataID, typeName: string): Record {
  // See perf note above for why we aren't using computed property access.
  const record = {};
  record[ID_KEY] = dataID;
  record[TYPENAME_KEY] = typeName;
  return record;
}
1220811
public static Object loadAll(final PersistenceStoreType storeType) {

        Object ret = null;
        try {

            File file = new File(persistenceStorePath + File.separator + storeType);

            log.info("aws-mock: try to load objects from {}", file.getAbsolutePath());

            ObjectInputStream in = new ObjectInputStream(new FileInputStream(file));
            ret = in.readObject();
            in.close();

        } catch (FileNotFoundException e) {
            // no saved file to load from
            log.warn("no saved file to load from: {}", e.getMessage());
            return null;
        } catch (IOException e) {
            // failed to load from the saved file
            log.warn("failed to load from the saved file: {}", e.getMessage());
            return null;
        } catch (ClassNotFoundException e) {
            log.error("ClassNotFoundException caught during loading object from file: "
                    + e.getMessage());
        }
        return ret;

    }
513475
function JSONLogRecord(level, msg, meta, time) {
    this._logData = new LogData(level, msg, meta, time);

    this.msg = msg;
    this.levelName = LEVELS[level];
    this.meta = meta;
}
1006193
function (store, type, fixtureRecord) {
    var fixture;
    if (fixtureRecord.id) {
      type = this._parseModelOrType(store, type);
      // lookup for a fixture
      fixture = this.fixtureForId(store, type, fixtureRecord.id);
      if (fixture) {
        Ember.merge(fixture, fixtureRecord);
        this._touchDateAttr(store, type, fixture, 'updatedAt');
        return fixture;
      }
    }
    else {
      throw new Error('Updating a fixture requires an ID.');
    }
    // new fixture
    this._touchDateAttr(store, type, fixtureRecord, 'createdAt', 'updatedAt');
    this.fixturesForType(store, type).pushObject(fixtureRecord);
    return fixtureRecord;
  }
840069
function baseFormat(data, strict) {
  const isArray = Array.isArray(data);

  if (!isArray && (data === null || typeof data !== 'object')) {
    throw new TypeError('data must be an Object or Array');
  }

  const records = [];

  if (isArray) {
    for (let i = 0, len = data.length; i < len; ++i) {
      records[i] = objectToRecord(data[i], strict);
    }
  } else {
    records.push(objectToRecord(data, strict));
  }

  return records.join('\n');
}
1205644
def get_record(identifier)
      doc = client.get!(CGI.escape(identifier)).body.to_json
      @record_class.build(mint_id(identifier), doc, 'application/json')
    end
699724
def mutate_json_record(self, json_record):
        
        for attr_name in json_record:
            attr = json_record[attr_name]
            if isinstance(attr, datetime):
                json_record[attr_name] = attr.isoformat()
        return json_record
147032
def format(self, record):
        
        message = super(ContainerEngineHandler, self).format(record)
        return format_stackdriver_json(record, message)
127791
private Object jsonToObject(String recordValue) throws JsonParseException, JsonMappingException, IOException{
		ObjectMapper mapper = new ObjectMapper();
		Object json = mapper.readValue(recordValue, Object.class);	
		return json;
	}
1286093
def _record_extension(self, bank_id, key, value):
        
        record_bean = {
            'value': value,
            'displayName': self._text_bean(key),
            'description': self._text_bean(key),
            'displayLabel': self._text_bean(key),
            'associatedId': str(bank_id)
        }
        return record_bean
583454
def serialize(self, cls, record):
        
        return json.dumps(record, cls=self.encoder)