Api.fromJson constructor

Api.fromJson(
  1. Map json_
)

Implementation

Api.fromJson(core.Map json_)
    : this(
        methods: json_.containsKey('methods')
            ? (json_['methods'] as core.List)
                .map((value) => Method.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        mixins: json_.containsKey('mixins')
            ? (json_['mixins'] as core.List)
                .map((value) => Mixin.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        options: json_.containsKey('options')
            ? (json_['options'] as core.List)
                .map((value) => Option.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        sourceContext: json_.containsKey('sourceContext')
            ? SourceContext.fromJson(
                json_['sourceContext'] as core.Map<core.String, core.dynamic>)
            : null,
        syntax: json_.containsKey('syntax')
            ? json_['syntax'] as core.String
            : null,
        version: json_.containsKey('version')
            ? json_['version'] as core.String
            : null,
      );