Required Instance Methodtuist.filesystem 0.7.9FileSystem

writeAsJSON(_:at:)

Given an Encodable instance, it encodes it as a JSON, and writes it at the given path.

FileSystem.swift:220
func writeAsJSON<T>(_ item: T, at: AbsolutePath) async throws where T : Encodable

Parameters

item

Item to be encoded as JSON.

at

Path at which the JSON will be written.