KeyRangeInfo.fromJson constructor

KeyRangeInfo.fromJson(
  1. Map json_
)

Implementation

KeyRangeInfo.fromJson(core.Map json_)
    : this(
        contextValues: json_.containsKey('contextValues')
            ? (json_['contextValues'] as core.List)
                .map((value) => ContextValue.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        endKeyIndex: json_.containsKey('endKeyIndex')
            ? json_['endKeyIndex'] as core.int
            : null,
        info: json_.containsKey('info')
            ? LocalizedString.fromJson(
                json_['info'] as core.Map<core.String, core.dynamic>)
            : null,
        keysCount: json_.containsKey('keysCount')
            ? json_['keysCount'] as core.String
            : null,
        metric: json_.containsKey('metric')
            ? LocalizedString.fromJson(
                json_['metric'] as core.Map<core.String, core.dynamic>)
            : null,
        startKeyIndex: json_.containsKey('startKeyIndex')
            ? json_['startKeyIndex'] as core.int
            : null,
        timeOffset: json_.containsKey('timeOffset')
            ? json_['timeOffset'] as core.String
            : null,
        unit: json_.containsKey('unit')
            ? LocalizedString.fromJson(
                json_['unit'] as core.Map<core.String, core.dynamic>)
            : null,
        value: json_.containsKey('value')
            ? (json_['value'] as core.num).toDouble()
            : null,
      );