toJson method

String toJson()

Returns a JSON-encoded representation of this platform.

Implementation

String toJson() {
  return const JsonEncoder.withIndent('  ').convert(<String, dynamic>{
    'numberOfProcessors': numberOfProcessors,
    'pathSeparator': pathSeparator,
    'operatingSystem': operatingSystem,
    'operatingSystemVersion': operatingSystemVersion,
    'localHostname': localHostname,
    'environment': environment,
    'executable': executable,
    'resolvedExecutable': resolvedExecutable,
    'script': script.toString(),
    'executableArguments': executableArguments,
    'packageConfig': packageConfig,
    'version': version,
    'stdinSupportsAnsi': stdinSupportsAnsi,
    'stdoutSupportsAnsi': stdoutSupportsAnsi,
    'localeName': localeName,
  });
}