RestResource.fromJson constructor

RestResource.fromJson(
  1. Map json_
)

Implementation

RestResource.fromJson(core.Map json_)
    : this(
        deprecated: json_.containsKey('deprecated')
            ? json_['deprecated'] as core.bool
            : null,
        methods: json_.containsKey('methods')
            ? (json_['methods'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  RestMethod.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        resources: json_.containsKey('resources')
            ? (json_['resources'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  RestResource.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
      );